someFunction(){.....
fiftyfifty();
// i need the result from fiftyfifty right here
if (fiftyfifty() = 1)
playerAttack();
else
compAttack();
}
}
int fiftyfifty(){
int randy;
srand((unsigned)time(0));
for(int index=0; index<1; index++){
randy = (rand()%2)+1;
}
return randy;
}