What is the difference between // and /* style comments?
Comments
Collapse
X
-
Strictly speaking // comments are C++ and C compilers do not support them. However many (but not all) C compilers today do support them.
// is a single line comment, the comment ends at the end of the line
/* ... */ has a comment closing mark and can span more than 1 line. The comment ends at the closing marker */ Because of this it is slightly more susceptable to error from accidentally nesting comments. -
Originally posted by BanfaStrictly speaking // comments are C++ and C compilers do not support them. However many (but not all) C compilers today do support them.
// is a single line comment, the comment ends at the end of the line
/* ... */ has a comment closing mark and can span more than 1 line. The comment ends at the closing marker */ Because of this it is slightly more susceptable to error from accidentally nesting comments.
What does the #include do?Comment
-
Beck, its time for you to read a book about c/c++ programming.
Here is a site to get you started:
Comment
Comment