|
|
int main(){ Fraction a();//I don't know this statement is ok return 0; } |
I don't know this statement is ok |
a
that returns an object of type Fraction
with no parameter.
Fraction a();
looks as though it ought to create an object using the default constructor, but it doesn't. In fact, as coder777 says, it declares a function.Fraction a;