Object (C++)
An object is a concrete instance of a class — a specific thing created from the class blueprint, with its own copy of the data. You call its member functions to make it do work.
C++
Each object has its own set of member variables, so two objects of the same class can hold different values. You access an object's members with the dot operator (object.member).
If you have a pointer to an object instead, you use the arrow operator (pointer->member) to reach its members.
Examples
C++
#include <iostream>
class Counter {
public:
int count = 0;
void add() { count++; }
};
int main() {
Counter c;
c.add();
c.add();
std::cout << c.count << std::endl;
return 0;
}Output:
2