Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC and custom typedefs

Status
Not open for further replies.

ahoodin

Programmer
Jul 25, 2001
48
US
Windows 98 MSVC 6.0 MFC

I am converting a few cpp files from a procedural model to a class model. The problem comes in here:

The class member functions have pointers to struct as arguments. How do I include the definitions of the structs (found in define.h) in the header file of the class I am creating, without causing errors on the other header file (C2370 redefinition; different storage class AND C2011 struct type redefinition).

Now I get the following errors on the args in the class header:

error C2061: syntax error : identifier 'PPGM'


The MSDN documentation states the compiler found an identifier where it was not expected.

Can somebody cut up the middle of this circulare problem?

HHOS,
Asher
 
Solved: a use Macro guard. b declare structs in class header.
c He who breaks a thing to find out what it is has strayed from the path of wisdom - Gandalf

d Doo be doo bee doo. - Sinatra.
 
Please put your code in detail or begin working on MS-WORD
 
Good Idea Dimsday,

If I re-write MS-WORD, it won't be so riddled with bugs like Office and MSDEV and all of the other Microsoft Suites.

If you want to see some code learn to ask nicely or go to SourceForge!

IE express yourself fully or start working on MS HAPPINESS 1.0 project.

HAND,
...
ahoodin




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top