C++ Tutorial

C++ came into existence when Bjarne Stroustrup started to improve C with Simula (another language) like features. Initially called as ""C with Classes"", the language was later renamed as C++ Programming Language. Learning C++ programming gives programmers a solid foundation to begin with.

C++ Tutorial

Learn C++ with our most complete and interesting C++ tutorial. Beginning with C++ basics, this tutorial will take you advance topics like C++ exception handling, C++ Multithreading etc. All the concepts of C++ programming are explained with practical examples and programs here. The practical approach of explaining everything with programs will make things very easy to understand for you.

Who is this C++ Tutorial designed for?

This C++ tutorial will be equally useful for the beginners and professionals. If you are a fresher, BCA, BE., BTech, MCA or college student, you will find this C++ tutorial extremely useful for your notes, exam preparation, lab exercises and viva questions.

What do I need to know to begin with?

A basic knowledge of C Programming will come quite useful before you begin with this C++ tutorial.

C++ syllabus covered in this tutorial

This C++ tutorial covers: Introduction to C++, Classes and Objects, Decision Making, Functions, Arrays, Strings, Pointer, Structure, Constructor & Destructor, Dynamic Memory Allocation, Operator Overloading, Inheritance, I/O Console, Templates, Exception Handling, Multithreading

That's almost everything about C++ Programming, so let's begin learning with this tutorial.

Introduction to C++

  • C++ was developed by Bjarne Stroustrup in 1979 at Bell Labs.
  • It is a general purpose programming language which supports procedural, object-oriented and generic programming.
  • The main purpose of C++ was to make writing good programs easier and more pleasant for the individual programmer.
  • It is a high-level programming language, but it includes many low-level facilities to manipulate the computer's memory.
  • It is the first Object-oriented programming language and most popular after C language.
  • C++ is a superset of C.

Features of C++

  • C++ is a compiled, case-sensitive, free-form programming language.
  • It is used to write device drivers and other softwares.
  • It is used for teaching and research because of clean basic concepts.
  • It supports object-oriented programming including four features such as encapsulation, data hiding, inheritance, polymorphism.
  • An Apple Macintosh or Windows has indirectly used C++ because the primary user interface of these operating systems are written in C++.

ANSI

  • ANSI stands for American National Standards Institution.
  • If a program is written in ANSI C++, it guarantees to run on any computer whose supporting software conforms to the standard.
  • C++ includes ANSI standard as a core language and also includes extra machine-dependent features to allow smooth interaction with different computers' operating systems.
  • ANSI standard ensures that C++ is portable.

Character Set of C++

  • Character set is a set of valid characters.
  • It is a combination of alphabets, digits, special symbols and white spaces.
CharactersList Included
AlphabetsA – Z, a – z
Digits0 – 9
Special CharactersSpace  +  -  *  /  ^  \  ()  []  {}  =   !=  <>  '   “  $  ,  ;  :  %  !  &  ?  _  #  <=  >=  @
Formatting CharactersBackspace, Horizontal tab, Vertical tab, Form feed and Carriage return.