Learn C++ easy

Learn  C++ easy








Sample of the pdf document 






C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs.
C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
This tutorial gives an initial push to start you with C++.


C++ is a statically typed, compiled, general purpose, case-sensitive, free-form programming language that supports procedural, object-oriented, and generic programming.

C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features.

C++ was developed by Bjarne Stroustrup starting in 1979 at Bell Labs in Murray Hill, New Jersey as an enhancement to the C language and originally named C with Classes but later it was renamed C++ in 1983.
C++ is a superset of C, and that virtually any legal C program is a legal C++ program.

C++ Compiler:
This is actual C++ compiler which will be used to compile your source code into final executable program.
Most C++ compilers don't care what extension you give your source code, but if you don't specify otherwise, many will use .

 Most frequently used and free available compiler is GNU C/C++ compiler, otherwise you can have compilers either from HP or Solaris if you have respective Operating Systems.


C++ Program Structure:
Let us look at a simple code that would print the words Hello World.

#include using namespace std; // main() is where program execution begins. int main() { cout << "Hello World"; // prints Hello World return 0; }


Comments in C++
C++ supports single line and multi-line comments. All characters available inside any comment are ignored by C++ compiler.

C++ comments start with /* and end with */. For example: /* This is a comment */ /* C++ comments can also * span multiple lines */
A comment can also start with //, extending to the end of the line. For example:

#include using namespace std; main() { cout << "Hello World"; // prints Hello World return 0; }


C++ Primitive Built-in Types:

C++ offer the programmer a rich assortment of built-in as well as user defined data types. Following table list down seven basic C++ data types:........







 Click here for  Download PDF / FREE

Learn  C++ easy 




1 commentaire: