C++ Tutorial – Introduction

C++ Tutorial

C++ is an Object Oriented Programming Language developed by Bjarne Stroustrup in 1979. C++ is widely used in development of application software, system software, drivers, games, etc., C++ is the enhancement of C. So before learning C++, I recommend you to learn basics of C. The main difference between C and C++ is OOPS. C++ is Object Oriented Programming language (OOPS). You will learn OOPS later in this C++ tutorial.

C++ basics:

1. Like C, C++ also needs a Compiler to compile and run. Most of the compiler will run both C & C++.
2. You need to save C++ program as name.cpp.
3. You need to include header files & Standard C++ library files in the top of C++ program.
4. Every C++ program should have main() function.
5. If you have problem in viewing output, then add “cin.get();” (without quotes) in the bottom of the program (before closing brace).

Header File in C++:

To make use of inbuilt C++ functions we need to include header files as like C.

In C, we use the following format to include header file.

1 #include<stdio.h>

But in C++, there is a small change in format.

1 #include<cstdio>

1. We need to include “c” before the header file name. For eg. cstdio.
2. We should not include “.h” in suffix.

Lets start learning C++ Programming Tutorial.