C++ - SPLessons
boy2 Chapter 1

C++ Tutorial

C++ - SPLessons

C++ Tutorial

shape Introduction

C++ is the extension of C programming language. C is a procedural, popular, general-purpose language and C++ is an Object Oriented Programming. CPP Tutorial chapter explains about how C++ was developed and discusses the below sub sections.

  • History
  • Features
  • Uses

History of C++

shape Description

Brajne Stroustrup invented C++ at Bell Laboratories in 1979. He first worked on simulation (Simula) which consists of object oriented programming concepts and later involved Simula in C without disturbing the originality of C.

C++ had additional features of C hence it was named as C++ in 1983.

shape Conceptual
figure


Introduction to C++

shape Description

C++ is the middle level language, which is an advancement to classic C language with some basic OOPS features. It acts as a base between high level language( like java, C#) and low-level language( like Assembly language). It it takes the features of both high level and low level. C is a subset of C++ and any C program can be even run on C++ compiler also.

Modern C++

shape Description

Modern C++ is really not hard.

Standard Library

The first thing about Modern C++ is using the Standard Library. C++ comes with a library of bits of pieces, called the Standard Library.

  • The Standard Library has a string class in it.
  • The Standard Library has great collections(linked list, stack, queue) and smart pointers that take care of memory management
  • It has File IO, Screen IO, and far too much to list.

Templates

When writing an application in C++, there is no need to manage memory, pointer arithmetic, those kinds of things. C++ has templates. Now generics are resolved at run time. That means every time when an application runs, some number of cycles are going to be spent figuring out, what type is used? What method was called? and What’s going on here? Templates in C++ are resolved at compile time.

Features of C++

shape Description

  1. C++ has rich library functions.
  2. C++ is a block of structures.
  3. Finally, the main important feature is Object oriented programming language which consists of

These are discussed in the next CPP Tutorial chapters.

Why to study C++

shape Advantages

-> C++ reduces the complexity of programs.

-> It emphasizes power and performance.

-> It helps in developing other programming languages.

-> It is efficient and works faster than C.

-> It is portable and works on any machine which allows ANSI standard.

-> Used for a client-based application that runs on Windows’s machine.

Summary

shape Key Points

CPP Tutorial chapter draws out the following main points.

  • Brajne Stroustrup invented C++ in 1979.
  • Object oriented programming introduced in C++.
  • C++ is procedural language.