![]() |
| ||
| [c++/visual studio 2003]Array Declaration Issue I have the following code: class dateUpon compilation I recieve these errors: n:\courses\8110\Labs\Lab7b\Lab7b.cpp(36) : error C2059: syntax error : '{' n:\courses\8110\Labs\Lab7b\Lab7b.cpp(36) : error C2143: syntax error : missing ';' before '{' n:\courses\8110\Labs\Lab7b\Lab7b.cpp(36) : error C2143: syntax error : missing ';' before '}' I'm not sure what I am doing wrong here, I have only been working with c++ for a little while now and have searched everywhere to find nothing already posted on the web. Any help on this issue is greatly appreciated. Denn0069 |
| ||
| Re: [c++/visual studio 2003]Array Declaration Issue you can't initialize arrays like that in the class definitions. Initialize it in the *.cpp file just like you would any other global array. // *.h file |
| ||
| Re: [c++/visual studio 2003]Array Declaration Issue Thanks, :cheesy: thought that with statics it was permissable though. cheers, denn0069 |
| All times are GMT -4. The time now is 2:29 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC