Jump to content
  • Advertisement
Sign in to follow this  
Gubber

Help

This topic is 4464 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
Advertisement

This topic is 4464 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  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!