Construction is a form of initialization, they help create objects of a class. It's actually a special function within the class.
Private data members make up the inner workings of a class. For example (cliché, i know), let's say you wanted to make a class that models a car. A car must have an engine in order to work. However, regular drivers shouldn't have to know how the engine works in order to operate the car. All you have to do is put the key in the ignition and start the car. This design would like so:
Code:
class Engine;
class Car
{
private:
Engine engine; // This is a private engine...
// Only the car itself knows about the greasy inner workings of the engine.
public:
void ignition_start() // This function is public... this is how people start the car.
{
engine.turnOn(); // They DON'T have to pop the hood and start the engine manually!
}
};
The public members of a class make up what is sometimes called the public interface of that class, because those members are what the outside world uses in order to operate that class.
In essence, private members can only be seen and used from within the class itself.