![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |||
| No, actually in C++, there are /* multi-line comments */ as well as // single-line comments the latter of which happen to also be valid in C, but only if you compile against the C99 specification (C programming has two specifications - C89 (1989) and C99 (1999)). If I used "#" for something like this: #ifndef _SOMETHING_ #define _SOMETHING_ #endif then those are actually not comments. #include, #ifndef, #define and #endif are preprocessor directives. That part comes from C and is used in case someone does something stupid like #include <stdio.h> in two different files that are supposed to work together, things like #ifndef serve a very important purpose to prevent clashes with duplicate definitions of functions. It would be like creating a program that uses two Main() methods in C# or two main() methods in Java. ![]() |
| The Following User Says Thank You to rpgfan3233 For This Useful Post: | ||
HelloWorld (07-14-2007) | ||
| |||
| I never knew much about namespaces. Thanks for all the great information! |
![]() |
| Thread Tools | |
| Display Modes | |
| |