So what im doing is creating a form that bitmaps move around and when they collide they “fight”. The bitmaps are saved a VBot and inherited into child bots which to keep track of the bots i built an array of pointers. The VBot and BotContainer are .h and .cpp files but when i attempt to create a private BotContainer in Form.h to keep track off the Bots it gives me the error message
Error 1 error C4368: cannot define ‘VList’ as a member of managed ‘Prog3::Form1’: mixed types are not supported c:\users\duerst\documents\visual studio 2010\projects\prog 3\prog 3\Form1.h 65 1 Prog 3
What can i do to fix this?
You are doing something like this:
This is illegal because managed types can’t have members of unmanaged types (and vice-versa). You need to use a pointer to a BotContainer, which you instantiate in the constructor and delete in the destructor: