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 thatCFileExtensionwas a function that returnedclass 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_CLASSis defined and#includethat file.