Hi i created my first header file but cant fathom out how to use it.I have saved it as .h file extension and its in the folder where all my source files are saved.Any tips?
heres the header file code,with some of the functions just in case the fault is in the code:
Code:#ifndef myfunctions.h
#define myfunctions.h
//playerdam
int playerdam(int &gobHealth)
{
int dam=diceRoll(10,1);
gobHealth-=dam;
return dam;
}
//gobdam
int gobdam(int &playerHealth)
{
int dam=diceRoll(10,1);
playerHealth-=dam;
return dam;
}
#endif