×

C++ Tutorial

C++ Data types

C++ Operators & Keywords

C++ Conditional Statements

C++ Functions

C++ 'this' Pointer, References

C++ Class & Objects

C++ Constructors & Destructors

C++ Operator overloading

C++ 11 (Advance C++)

C++ Preparation

C++ Header Files & Functionsr

Data Structure with C++

C++ - Miscellaneous

C++ Programs

C++ Single & Multiline comments

Comments are pieces of source code discarded from the code by the compiler. They do nothing. Their purpose is only to allow the programmer to insert notes or descriptions embedded within the source code.

C++ introduces a new comment symbol // (double slash), comments starts with a double slash symbol and terminate at the end of line.

Types of C++ Comments

  1. Single line comment
    // your comment goes here...
  2. Multi line comment
    /* your comment goes here... */

Comments using single line comment symbol

    // This is an example to print Hello.
    // Author : includehelp.com. 
    // Date : 13-02-2012.

Comments using multi line comment symbol

     /* This is an example to print Hello.
        Author : includehelp.com. 
        Date : 13-03-2012.
     */

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.