Member variables (also called data members or fields) store the state of an object. When you write class Car { int speed; string model; }, every Car object gets its own speed and model values.
Declare member variables inside the class body, typically in the private section. Making them private prevents external code from setting invalid values like speed = -50. You control access through public member functions.
Initialize member variables in the constructor using an initializer list: Car() : speed(0), model("") { } This is more efficient than assigning values inside the constructor body, especially for complex types.