struct NewPlayer
{
int level;
int intelligence;
int damage;
};
int CharacterInfo(NewPlayer MageWizard, int Clevel,int Cint, int Cdam)
{
cin >> Clevel;
cin >> Cint;
cin >> Cdam;
}
//*****************************************************************
I need a seperate function here that will inherit the values from the
structure in the function above.My problem is I dont know how to create
a seperate function that will grab the values of the structure
from CharacterInfo(NewPlayer MageWizard, int Clevel,int Cint, int Cdam)
to later be called upon in int main()
***The purpose of the seperate function is to use the structure values
from the function above to forumlate an equation that will return a single
integer value that will later be displayed in int main()
//******************************************************************
int main()
{
NewPlayer Wizard;
int Flevel, Fdamage, Fintelligence;
CharacterInfo(Wizard, Flevel, Fdamage, Fintelligence)
//*********************************************************
use the new function here to display the returned int value
//*********************************************************
}
Thank you for your time,help, and consideration.