I recently encountered this problem. I found many instances of people asking the question—here, for example—but no concrete answers.
Here's the sample code hoisted from that link:
class AFX_BASE_APPLICATION_APP_CLASS CFileExtension
{
public:
CFileExtension ();
virtual ~CFileExtension ();
};
The error this generates is:
c:\FileExtension.h(14) : error C2470: 'CFileExtension' : looks like a function definition, but there is no formal parameter list; skipping apparent body
You've almost certainly missed the header which defines AFX_BASE_APPLICATION_APP_CLASS
. In that case, it would be passed through unaltered and VC++ would assume that CFileExtension
was a function that returned class AFX_BASE_APPLICATION_APP_CLASS
.
And, since it thinks it's a function, it also thinks it needs parentheses.
You just need to find where AFX_BASE_APPLICATION_APP_CLASS
is defined and #include
that file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With