can't get this to compile on VC++ but on others it will..
#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
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;}
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;}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement