Hi. I've declared some variables in the header file of a class, but when I try to compile to test, it says that they aren't declared in this scope, and I have no idea what's wrong, this works elsewhere.
#include "statClass.h"
using std::cout;
using std::endl;
using std::cin;
statClass::statClass()
{
//ctor
}
void strengthAlloc () {
system("CLS");
cout << "STRENGTH: " << statStr << endl;
cout << "POINTS TO ALLOCATE: " << allocPoints << endl;
cout << "---------------------" << endl;
cout << "Enter amount to give or use negative to take away." << endl;
cin >> intChoice;
if (allocPoints - intChoice < 0 && statStr + intChoice < 0) {
cout << "Invalid, too many points to add/take." << endl;
} else {
allocPoints -= intChoice;
updStr(intChoice);
}
statAlloc();
}
void statAllocIntro (){ // statistic allocation!
cout << "Now you can allocate your statistics." << endl;
cout << "There are three statistics, Strength, Wisdom, and Magic." << endl;
cout << "Strength is a measure of your raw physical power." << endl;
cout << "Wisdom is a measure of your general knowledge." << endl;
cout << "Finally, Magic is a measure of your proficiency with magic spells." << endl;
system("PAUSE");
}
void statAlloc() {
while ( /* enter stuff here */ ){
system("CLS");
cout << "STRENGTH: " << statStr << endl;
cout << "WISDOM: " << statWis << endl;
cout << "MAGIC: " << statMag << endl;
cout << "POINTS TO ALLOCATE: " << allocPoints << endl;
cout << "-----------" << endl;
cout << "S to allocate strength, W to allocate wisdom, M to allocate magic, and F to Finish." << endl;
switch (choice) {
// put cases here
}
}
}