Hi
I have that test class
I am interested what is the difference between the two object declaration, because second declaration ( TestClass rt1(); ) seems to do nothingCode:#include<iostream> class TestClass { public: TestClass() { std::cout << "Constructor" <<std::endl; } ~TestClass() { std::cout << "Deconstructor" << std::endl; } }; int main() { //what is the difference between them TestClass rt; // show constructor, deconstructor output TestClass rt1(); // does nothing return 1; }
Thanks