B
bb
Hi,
Class Test {
public:
Test() { cout << "Hello from Test" << endl; }
~Test() { cout << "Bye from Test" << endl; }
};
int main(int argc, char** argv) {
Test t1; // Does call the constructor and i can see the output.
Test t2(); // Compiler (mis)takes it for a function prototype? no
output. why? how to avoid it?
}
Thanks.
Class Test {
public:
Test() { cout << "Hello from Test" << endl; }
~Test() { cout << "Bye from Test" << endl; }
};
int main(int argc, char** argv) {
Test t1; // Does call the constructor and i can see the output.
Test t2(); // Compiler (mis)takes it for a function prototype? no
output. why? how to avoid it?
}
Thanks.