T
Timothee Groleau
Hi,
Could someone tell me what's wrong with this test case based on the compiler
error I get?
==============
class MyClass
{
private:
int i;
public:
void f() {};
};
int main()
{
MyClass c();
c.f();
}
==============
compiler (gcc 3.3.6) output:
==============
test.cpp: In function `int main()':
test.cpp:12: error: request for member `f' in `c', which is of
non-aggregate type `MyClass ()()'
==============
Thanks,
Tim.
Could someone tell me what's wrong with this test case based on the compiler
error I get?
==============
class MyClass
{
private:
int i;
public:
void f() {};
};
int main()
{
MyClass c();
c.f();
}
==============
compiler (gcc 3.3.6) output:
==============
test.cpp: In function `int main()':
test.cpp:12: error: request for member `f' in `c', which is of
non-aggregate type `MyClass ()()'
==============
Thanks,
Tim.