Sign in to follow this  

Help

This topic is 4250 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im getting an error "MObject: no appropriate default constructor avaliable", i found a similar error on the fourms here and you were able to help him but I still cant figure it out. Whats wrong with this? /*animal.h*/ #ifndef ANIMAL_H #define ANIMAL_H #include "Object.h" #include "ATask.h" struct Animal : MObject { ATask* mtask; Animal(string name, int x, int y, char rep, int col, bool obs); }; #endif /*animal.cpp*/ #include "Animal.h" Animal::Animal(string name, int x, int y, char rep, int col, bool obs) { Animal::name = name; Animal::x = x; Animal::y = y; Animal::col = col; Animal::rep = rep; Animal::obstruction = obs; } the decleration is currently in Main.h and is as follows Animal *mob = new Animal("Ian", 10, 5, (char)CLOSEDFACE, 12, true); Thanks, Gubber

Share this post


Link to post
Share on other sites

This topic is 4250 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this