class base {
int i;
public:
base()
{
i = 10;
cout << "in the constructor" << endl;
}
};
int main()
{
base a;// here is the point of doubt
getch();
}
What is the difference between base a
and base a()
?
in the first case the constructor gets called but not in the second case!
See Question&Answers more detail:os