Please have a look at the following header file
#pragma once
using namespace UsbLibrary;
ref class MissileLauncher
{
public:
MissileLauncher(void);
private:
//Bytes used in command
unsigned char UP[10];
unsigned char RIGHT[10];
unsigned char LEFT[10];
unsigned char DOWN[10];
unsigned char FIRE[10];
unsigned char STOP[10];
unsigned char LED_OFF[9];
unsigned char LED_ON[9];
UsbHidPort USB;
};
I am using a Visual C++ project (C++/CLI ?) in visual studio professional 2010. When I run this code, I get lot of errors
Error 1 error C4368: cannot define 'UP' as a member of managed 'MissileLauncher': mixed types are not supported
Error 2 error C4368: cannot define 'RIGHT' as a member of managed 'MissileLauncher': mixed types are not supported
Error 3 error C4368: cannot define 'LEFT' as a member of managed 'MissileLauncher': mixed types are not supported
Error 4 error C4368: cannot define 'DOWN' as a member of managed 'MissileLauncher': mixed types are not supported
Error 5 error C4368: cannot define 'FIRE' as a member of managed 'MissileLauncher': mixed types are not supported
Error 6 error C4368: cannot define 'STOP' as a member of managed 'MissileLauncher': mixed types are not supported
Error 7 error C4368: cannot define 'LED_OFF' as a member of managed 'MissileLauncher': mixed types are not supported
Error 8 error C4368: cannot define 'LED_ON' as a member of managed 'MissileLauncher': mixed types are not supported
Here, the namespace USBLibrary
is coming from a C# dll file. The UsbHidPort;
is an object from that C# dll
So, why am I getting this error? Any ideas?