|
Beginner Needing Help |
DrgnAK
Member #8,687
May 2007
|
Hi, I'm rather new to C++, and I can't figure out why this can't compile:
I get six compile errors in Code::Blocks. They are: Quote:
error: new types may not be defined in a return type Could someone help, please? I've spent a while trying to figure this out and I don't know what's wrong. Even if I turn fix to int, I still get the first three errors. |
Indeterminatus
Member #737
November 2000
|
Quote: note: (perhaps a semicolon is missing after the definition of `paddle') ...and that's exactly what went wrong here class paddle { protected: fix x,y; public: paddle(fix _x, fix _y); ~paddle(); void control(); }; // <-- mind the semicolon paddle::paddle(fix _x, fix _y) { x = _x; y = _y; }
_______________________________ |
DrgnAK
Member #8,687
May 2007
|
Oh... heh. Didn't realise that I needed a semicolon there. The error seemed odd to me and I didn't know what to do with it Thanks! I'm truly grateful for your help. |
|