👉🏻 If you want to enjoy the full experience exploring this pdf, check it out here Modern C++ Concepts OOP
C++ History
- C++ derived from C derived from B derived from BCPL language
- the ‘++’ in the name is the ++ operator
- C was developed by Dennis Ritchie at AT&T Bell labs in 1970s
- C++ was developed by Bjarne Stroustrop at AT&T Bell labs in 1980s
- Overcome shortcomings of C
- C was subset of C++ until 2003
- Introduced OOP (Object Oriented Programming)
- C++ Design Concerns
- Systems Programming
- Embedded systems
- Resource constrained systems
- Low level programming
- C++ Standards (C++89, C++99, C++11, C++14, C++17, C++20, C++23)
- New standards make language faster, safer, more powerful, more flexible, easier to use, keep backward compatibility, up-to-date with new standards
C++11, C++14 Features
1. Type Inference with Auto
- Type interface is the ability of the compiler to infer the type of a given variable without explicitly stating it
- This is achieved using the keyword auto
- auto keyword replaces the type identifier like int, string, double, etc.
- An initial value should be assigned in order for the compiler to infer the type
- Type inference using auto keyword simply tells the compiler to deduce the type of a declared variable from its initialization expression
- It maybe better to declare the type for simple types, so it is explicitly stated
- auto keyword has value when used for long complex types and it forces initializing variables