What Is C++?
C++ started as "C with Classes" — it kept nearly all of C's syntax and low-level control, and added object-oriented programming, templates, and a large standard library on top.
#include <iostream>
int main() {
std::cout << "Hello, world!" << std::endl;
return 0;
}
Like C, C++ compiles directly to native machine code with no virtual machine and no garbage collector — but where C asks you to build every data structure and abstraction by hand, C++ gives you classes, the Standard Template Library (STL), and a much richer set of built-in tools for the same underlying, close-to-the-hardware model.