Here's my problem. I have a structure declared before my main function
struct yourstats
{ char classname[80];
int hp;
int maxhp;
int mp;
int maxmp;
int attack;
int defense;
}stat;
I want this to be shared so that i can use stat for all of my function, which right now I have 3. Is there a way to pass these without using parameters.
For example I have in a chooseclass function where it sets all of those variables, i put in a cout statement to make sure it works in that function and it does,
yourstats stat={"Warrior", 30, 30, 5, 5, 20, 15};
But when I try to access it from another function
cout<< "Welcome " << name <<" the "<<stat.classname<<". What would you like to do? "<<endl;
All i get is a blank. Any suggestions? THanks in advance