Hello Everybody,
I have a small doubt regarding how we can call constructors in a C++ class
class test
{
public:
test()
{
cout<<"In test\n";
}
};
int main()
{
test t1;
test t2(); // This call does not give compile time error but does not call the constructor
cin.get();
}
So my question is what exactly happens when the statement test t2() is executed. Why does this call not invoke the default constructor.