Comments in C++

Let's go ahead and talk about comments. This will be a quick entry but a very critical one at that. Comments let other programmers know what is going on in the code and who edited what and of course what does what. We got two basic types of comments allowed by C++. We have the // single line comment and we got a /* multiple line comment. */ Here is an example below:

using namespace std;
//Begin execution.
int main()

{
}


According to Dietel C++ how to program we should write a comment at the top describing the program. I failed to do this and I turned this in, I will probably get points docked off.
GoBack     Previous         Next

No comments:

Post a Comment