Hmmmmm....
I have narrowed it down to the ITEM class, which is a tree of item types.
For some reason I can't get the items inside the class to work.
here it is:
Code:
class ITEM {
public:
int TYPE; //the type of item
string NAME; //the item's name
ACC AC; //where the actual item is stored
WEAPON WE;
BOOK B;
ARMOR A;
void ShowItem(void) {//a member function for displaying items
//clear screen and show item name.
system("cls");
cout
<< NAME
<< "\n";
//show item for correct type:
if (TYPE == BOOK) {B.ShowBook();}
else if (TYPE == AX) {AC.ShowAcc();}
else if (TYPE == ARMOR) {A.ShowArmor();}
else if (TYPE == WEAPON) {WE.ShowWeapon();}
else {
cout
<< "Corrupt item: \""
<< NAME
<< "\"\n";}} //end of member function
};//end of class
When I try to compile it gives me all kinds of errors. Such as
Soandso is used as a type but not defined as a type. However
BOOK, ACC, WEAPON, and ARMOR are all classes and all
spelled correctly and so forth. If I lose the ITEM class, it compiles perfectly. Frustration has set in and I would like a bit more help. I thank everyone who has replied for their help.