Introduction
C++ was created by Bjarne Stroustrup in 1985 as "C with Classes" — it takes the performance and low-level control of C and adds object-oriented programming (classes, inheritance, polymorphism) plus a large standard library (the STL).
C++ is widely used for game engines, competitive programming, high-frequency trading systems, and performance-critical software.
Syntax
#include <iostream>
using namespace std;
int main() {
// your code here
return 0;
}Example
cout ("character output") prints to the console; << sends data into the output stream.
#include <iostream>
using namespace std;
int main() {
cout << "Hello, World!" << endl;
return 0;
}Try it yourself
Copy this example into the C++ compiler and run it — try changing a value and see what happens.
