1. History & Evolution of C++
Standard | Year | Key Features |
C++98 | 1998 | First standardized version (templates, exceptions, STL) |
C++11 | 2011 | auto, lambda expressions, smart pointers |
C++14 | 2014 | Binary literals, generic lambdas |
C++17 | 2017 | Structured bindings, filesystem library |
C++20 | 2020 | Concepts, ranges, coroutines |
C++23 | 2023 | mdspan, stacktraces, std::print |
C++11 Example
#include
#include
int main() {
std::vector numbers = {1, 2, 3};
for (auto num : numbers) {
std::cout << num << " ";
}
return 0;
}
1 2 3
3. Your First C++ Program
#include
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
Hello, World!
Compilation & Execution
g++ -o hello hello.cpp
./hello