Why can't I declare this near the top of the Form1.h file...
It strikes error C4368; something about mixed type.
What is mixed about the types?
Can't tell out of context. Need more code.
Thanks for the note on the use of . . .
array<int,1>^ someArray = gcnew array<int, 1>(10);
instead of . . .
for creating an array in a type CLR C++ program.
A collegue suggested declaring the more familiar array in the .cpp file that is created by Visual C++ when Form1 is created. And then declaring it as an extern in the Form1.h file. That worked.
Your suggestion worked too, after I put the word "static" to the left of it.
I'm glad this worked but it is very frustrating at the same time because the new way of declaring an array seems so arbitrary as well as complicated. This and other "new" ways of doing things makes it seem as if Microsoft is inventing a whole new language. You'd think that they could translate what we are used to in the compiler.
Can you recommend a book or a link that explains this new CLR language?
I really enjoyed your link to Google above. Clever.
>>This and other "new" ways of doing things makes it seem as if Microsoft is inventing a whole new language.
They did :) CLR != C++ != C#