hi,i am trying to make a global integer array of size 32 in Windows forms.I am Using Visual Studio C++ 2008.
here is my code:
array<Int32^> ^garray = gcnew array<Int32^>(32);
if i declare it globally then it gives the following error:
"error C3145: 'garray' : global or static variable may not have managed type 'cli::array<Type> ^'
may not declare a global or static variable, or a member of a native type that refers to objects in the gc heap"
and if i declare it in private then:
error C3845: 'GuiTesting::Form1::garray': only static data members can be initialized inside a ref class or value type
can anybody tell me how to make it?...i am new to gui