   Class errors
  Hello all,I'm getting trouble with a class that I just added:extern class c_piece{public:int rotation;void rotate(){rotation++;}int x;int y;int arr_size [4] [4];};This is the error:Quote:error: a storage class can only be specified for objects and functionsHere is all of the code (with Xcode project build if you have a Mac :)):Link to filesAny ideas?   
  Never used this language before... but...Just based on the error, it sounds a lot like you'll have to change the extern keyword, or else get rid of your fields (int x, y, arr_size)This is just a total guess, hope it helps.   ;Quote:Original post by BubbaColaNever used this language before... but...Just based on the error, it sounds a lot like you'll have to change the extern keyword, or else get rid of your fields (int x, y, arr_size)This is just a total guess, hope it helps.Good guess. That extern thing wasn't supposed to be there, though. It has a different error without the extern there, referencing to Other_functions.cpp, saying that basically the class is not defined there. Soooo... how do I get it to be defined in both files?   ;  It looks like you're trying to use the global variable curr_piece in Other_Functions.cpp. You need to add this line to sdl_t002.hextern c_piece curr_piece;You need to use the extern keyword for global instances of a class, but not on the class definition itself.   ;  Ok, so what you wrote got me to thinking, and I got it fixed. The problem was in that I didn't properly define something directly above where I defined the class. Thanks for the help!adam_oEDIT: Meh, I posted after pi_equals_3, but I came to the same conclusion as him. Thanks!   