Supports encapsulation, inheritance, polymorphism, and abstraction.
class Animal {
public:
void speak() { cout << "Sound"; }
};
Includes commonly used data structures like vector, map, set, etc.
#include <vector>
vector<int> v = {1, 2, 3};
Variables that store memory addresses. Used for dynamic memory and object manipulation.
int* ptr = &x;
Allows a class to use properties and methods of another class.
class Dog : public Animal { };
Use fstream for reading/writing files in C++.
ofstream fout("file.txt");
fout << "Hello";