C++ Comments.


C++ allows // as an inline comment, it can be used on any line and is delimited by the newline character (return).


  main()
  {
      int Counter = 0;       // Initalise Counter.

      /* Start the main processing here. */
  }

A handy feature of the new comments is the ability to nest them within the old style comments.

This provides a handy debugging tool. If you write your normal comments using the // syntax, you can then comment out blocks of code while debugging with /* */


C comments

/* ... */ comments


Top Master Index C++ Keywords Functions


Martin Leslie 30-Jan-96