View Single Post
  #12 (permalink)  
Old 07-08-2007, 11:51 PM
rpgfan3233 rpgfan3233 is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jul 2007
Posts: 118
iTrader: (0)
rpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura about
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.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
The Following User Says Thank You to rpgfan3233 For This Useful Post:
HelloWorld (07-14-2007)