P
Peter Oliphant
OK. I created a managed class. Now I want to create a global pointer to an
instance of the class that the entire application can reference.
Yet, when I do something like:
MyManagedClass* my_instance ;
as a global variable (i.e., it's not in a process of class or struct, or
etc.) it tells me something like 'managed class instances can't be global'.
That seems pretty restrictive...
What can I do to create global instances of a managed class?
The exact error message is:
error C3145: 'form' : cannot declare a global or static managed type object
or a __gc pointer
for this code:
PAO_Form* form ; // which is not in anything, just part of the .CPP file
that contains main()
[PAO_Form is a __gc class]
Thanx in advance for any help! : )
instance of the class that the entire application can reference.
Yet, when I do something like:
MyManagedClass* my_instance ;
as a global variable (i.e., it's not in a process of class or struct, or
etc.) it tells me something like 'managed class instances can't be global'.
That seems pretty restrictive...
What can I do to create global instances of a managed class?
The exact error message is:
error C3145: 'form' : cannot declare a global or static managed type object
or a __gc pointer
for this code:
PAO_Form* form ; // which is not in anything, just part of the .CPP file
that contains main()
[PAO_Form is a __gc class]
Thanx in advance for any help! : )