Best C++ Online Tutorial

Introduction to C++ Programming

As the name suggest, C++ is a programming language based on C with some added features (represented by ++) which makes possible the creation of comparatively efficient programs. C++ programming inherits all the good features of C by filtering out some of the limitations of C. In addition, C++ programming also possesses some extremely new unique concepts which were not at all present in C. However, since C++ is based on C, it is extremely important to have a thorough knowledge of C. However, by chance you are not thorough with C Programming then you are strictly recommended to have a look at Learn C Online tutorial – www.LearnCOnline.com. Remember, it is extremely important to have a strong foundation in order to build a strong structure. Now, let us turn our attention to the study of C++. So, let’s start our journey towards the study of C++…

Data Types in C++

Data types supported by C++ can be broadly divided into six heads as stated follows: int data-type char data-type float data-type double data-type bool (boolean) data-type enum (enumeration) data-type 1) int data-type: int data-type represents the whole number (i.e., integer) quantities. Integers are required not to contain a decimal point or an exponent. int data-type can also be further sub-divided into two broad categories, viz, short int and long int signed int and unsigned int short int and long int The qualifier short, when placed in front of the int declaration, tells the C++ system that the particular variable being declared will be used to store fairly small integer values. On the other hand, the qualifier long, when placed in front of the int declaration, tells the C++ system that the particular variable being declared will be used to store fairly large integer values. signed int and unsigned int In case...

Comment Statements in C++

Unlike C, C++ supports two types of comments. C programmers are familiar with the /*..*/ style of commenting. Anything lying within the /*..*/ pair is ignored by the compiler. C plus plus (C++) additionally supports the // notation of commenting. Here, everything following // till the end of line is treated as comment. Usually /*..*/ style is used for commenting out of a block code, whereas, // is used for single-line comments. Example of single-line comment: // This is a single line comment Example of multiple-line comment: /*This is a multiple line comment*/