Introduction to C++


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

C++ is considered a mid-level language, which combines the characteristics of high-level languages ​​and low-level languages.

C++ was designed and developed by Bjarne Stroustrup in 1979 at Bell Laboratories in Murray Hill, New Jersey. C++ further extended and improved the C language, originally named C with classes and later renamed C++ in 1983.

C++ is a superset of C. In fact, any legal C program is a legal C++ program.

Note: Programming languages ​​that use static typing perform type checking at compile time rather than at run time.

Object-oriented programming

C++ fully supports object-oriented programming, including the four major characteristics of object-oriented development:

  • Encapsulation

  • Data hiding

  • Inheritance

  • Polymorphism

Standard Library

Standard C++ consists of three important parts:

  • The core language provides all building blocks, including variables, data types and constants, etc.

  • The C++ standard library provides a large number of functions for operating files, strings, etc.

  • The Standard Template Library (STL) provides a large number of methods for operating data structures, etc.

ANSI Standard

The ANSI standard is designed to ensure the portability of C++ - the code you write will compile on Mac, UNIX, Windows, and Alpha computers.

Because the ANSI standard has been in stable use for a long time, all major C++ compiler manufacturers support the ANSI standard.

Learning C++

The key to learning C++ is to understand the concepts, rather than delving too deeply into the technical details of the language.

The purpose of learning a programming language is to become a better programmer, that is, to design and implement new systems more efficiently, as well as maintain old systems.

C++ supports multiple programming styles. You can write code using any programming style such as Fortran, C, Smalltalk, etc. Each style effectively guarantees runtime efficiency and space efficiency.

Use of C++

Programmers in basically every application field use C++.

C++ is usually used to write device drivers and other software that directly operates hardware that requires real-time performance.

C++ is widely used in teaching and research.

Anyone using an Apple Computer or Windows PC is indirectly using C++ because the primary user interface for these systems is written in C++.