As we begin the study of C++ and object oriented programming, a few commentsare in order to help you get started. Since the field of object oriented programming is probably new to you, you will find that there is a significant amount of new terminology for you to grasp. This is true of any new endeavor and you should
be warned not to be intimidated by all of the new concepts.

We will add a few new topics in each tutorial and you will slowly grasp the entire language.

Comments in C++

Examine the file named CONCOM.CPP for an example of several new things in C++. We will take the CONCOM.CPP new constructs one at a time beginning with the comments.

A comment begins with the double slash “//”, starts anywhere on a line, and runs to the end of that line where it is automatically terminated. The old method of comment definition used with ANSI- C can also be used with C++ as illustrated in lines 11 through 14, among other places in this program. The new method is the preferred method of comment definition because it is impossible to inadvertently comment out several lines of code. This can be done by forgetting to include the end of comment notation when using the older C method of comment notation. Good programming practice would be to use the new method for all comments and reserve the old method for use in commenting out a section of code during debugging since the two methods can be nested.

It would be well to caution you at this point however, that you should not use comments when the same sense of program definition can be obtained by using meaningful names for variables, constants, and functions. The careful selection of variable and function names can make nearly any code self documenting and you should strive to achieve this in your code.