Is there any way to mix visual c++ with normal c++?

like can i enable mixed code?
i want to get rid of this error:

1>tab.h(32) : error C4368: cannot define 'p' as a member of managed 'Monitor4vc::tab': mixed types are not supported

Do you really mean mixing managed and native code? Visual C++ is just a compiler, which compiles C++ code.

Perhaps if you gave a full piece of code to illustrate the problem? There's not much we can do with just an error message and no context. Crystal balls don't have a very long range.

this is giving me an error (example)

struct Playernew
{
char name[11];
signed short kills;
signed short assists;
signed short betrays; //+suicide--cf74
signed short deaths;//cf76
signed short suicides;//cf78
unsigned char kingSecO;// ones place in % of king time --cf8c
unsigned char kingSecT;// tens place in % of king time (out of F)--cf8d
signed short laps; //cf8e 
signed short captures; //ce93
signed short returns;
signed short scores; //cf90
signed short ping;//cfa4

};

1>e:\prgms\monitor 4 vc++\monitor 4 vc++\status.h(39) : error C2814: 'player::Playernew' : a native type cannot be nested within a managed type 'player'

If your compiler is fully ANSI/ISO compliant it should work with all standard C++ code ...

that doesnt help....
so when i make that struct a ref struct it gives me the "mixed code" error on the char array

ref	struct Playernew
{
char name[11];
signed short kills;
signed short assists;
signed short betrays; //+suicide--cf74
signed short deaths;//cf76
signed short suicides;//cf78
unsigned char kingSecO;// ones place in % of king time --cf8c
unsigned char kingSecT;// tens place in % of king time (out of F)--cf8d
signed short laps; //cf8e 
signed short captures; //ce93
signed short returns;
signed short scores; //cf90
signed short ping;//cfa4

};
\structs.h(5) : error C4368: cannot define 'name' as a member of managed 'Monitor4vc::Playernew': mixed types are not supported

thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.