Vektor is my class, pole is public variable type: int *pole; Memory is allocated in constructor (using new).
I defined constructor, which fills the vector pole and then writes "Vector born". Copy constructor copies and writes "Vector copyied". Destructor writes "Vector dead".
My main:
Vektor* A = new Vektor;
Vektor* B = new Vektor;
Vektor* C = new Vektor(*A);
*C=*A+*B;
And what happens? In console, the program writes: Vector born, Vector copyied, Vector dead, Vector dead. That means Constructor, Copy constructor and twice Desctructor was used. Does anyone know what is really happening in the program?