Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Klemvore

can't get this to compile on VC++ but on others it will..

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

#include // should be #include using namespace std; // should be added and now it compiles! enum WeaponType { Edged = 1, Blunt = 2, Bow = 3, }; class Item { private: // Protected Data string itsShortDescription; string itsLongDescription; public: // Accessors string GetShortDescription() {return itsShortDescription;}; string GetLongDescription() {return itsLongDescription;}; }; Edited by - klemvore on September 25, 2001 10:37:09 AM

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
The enum should be

enum WeaponType
{
Edged = 1,
Blunt = 2,
Bow = 3
};

Get rid of the ; at the end of the accessor function

string GetShortDescription() {return itsShortDescription;}
string GetLongDescription() {return itsLongDescription;}




Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!