Declaring a constant or variable in a windows form
-
Hi guys! I'm using the c++ windows forms desinger (VS 2008 Express) for the first time. If I want to declare a new variable constant or array, one of these or both errors appear: error C3845: 'CalculatoR::Form1::i': only static data members can be initialized inside a ref class or value type error C4368: cannot define 'i' as a member of managed 'CalculatoR::Form1': mixed types are not supported I think that I maybe declare the variable at the wrong position. Where do I have to declare variables ond so on? Thanks for your help.
-
Hi guys! I'm using the c++ windows forms desinger (VS 2008 Express) for the first time. If I want to declare a new variable constant or array, one of these or both errors appear: error C3845: 'CalculatoR::Form1::i': only static data members can be initialized inside a ref class or value type error C4368: cannot define 'i' as a member of managed 'CalculatoR::Form1': mixed types are not supported I think that I maybe declare the variable at the wrong position. Where do I have to declare variables ond so on? Thanks for your help.
Austrian_Programmer wrote:
think that I maybe declare the variable at the wrong position
And wrong forum, I suppose... :-D Post your question to the Managed C++/CLI one. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles]