Seriously: can you FULLY understand this?
#include <iostream>
class A
{
public:
A() { std::cout << "Hallo ..." << std::endl; }
~A() { std::cout << "... Bye!" << std::endl; }
};
A a;
int main()
{
return 0;
}
If your answer is "no" or "partially", then the problem is not what you asked, but C++ itself.
If that's the case, you'd better to start from the very beginning ...