I have a problem using managed code, I don't know a lot about it and any tutorials I have found just confuse me more.
Here is some code with the errors its producing:
error C3145: 'manage' : cannot declare a global or static managed type object or a __gc pointer
error C2653: 'Manage' : is not a class or namespace name
I suspect it might be my use of a constructor but I'm not sure. Can anyone help me out with this?
Dan
Here is some code with the errors its producing:
Code:
//main.cpp
Manage* manage;
int WINAPI WinMain(..,..,..,..)
{
manage = new Manage();
manage->Method();
return 0;
}
Code:
//manage.h
__gc class Manage
{
public:
static Process* m;
Manage();
Method();
}
Code:
//manage.cpp
Manage::Manage();
void Manage::Method()
{
m = Process::Start(NULL);
}
error C3145: 'manage' : cannot declare a global or static managed type object or a __gc pointer
error C2653: 'Manage' : is not a class or namespace name
I suspect it might be my use of a constructor but I'm not sure. Can anyone help me out with this?
Dan