• Advertisement

Archived

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

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

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