void init();
void tim();
int str;
int per;
int tou;
int rea;
int qui;
int wou;
void main()
{
init();
tim();
cout<<"\nPerception-" <<per<<"\nStrength -"<<str<<"\ntoughness -"<<tou<<"\nWounds -"<<wou<<"\nQuickness -"<<qui<<"\nReactions -"<<rea;
system ("pause");
}
void init()
{
cout<<"You have 45 points to put into stats"<<"\nPerception-1pts. per \nStrength -2pts. per \ntoughness -4pts. per \nWounds -3 pts per \nQuickness -3pts. per \nReactions -1 pts. per \n";
cout<<"These are your stats";
cout<<"\nPerception-";
cin>>per;
cout<<"\nStrength -";
cin>>str;
cout<<"\ntoughness -";
cin>>tou;
cout<<"\nWounds -";
cin>>wou;
cout<<"\nQuickness -";
cin>>qui;
cout<<"\nReactions -";
cin>>rea;
cout<<per<<str<<tou<<wou<<qui<<rea;
system ("pause");
return;
}
I've tried multiple ways to do this. Basically i want the program to go to init() for the user to enter the stats and return the values back. -declaration errors right now.
what would putting the values like this do? void init(int per, int str, int wou....)
I did this, but had the values changing back to 0 once it got back to main. I'm not sure if i shouldve done something else or not.