I don't think if has a capital "I". I dislike c++, so that is all the help I can offer.
As the wise programmer once said: "Use single quotes for single characters."
declare all your variables at the beginning of the function
halfway through the function.
My corrected code HAS NOT BEEN TESTED
Could work, you never know.
int main(int argc, char *argv)
printf("What type of operation are you performing?\n");
printf("Rob Vaults=1 Rob Towers=2 Rob Granaries=3 Kidnap Peasants=4, Steal Horses=5\n>");
if (operationtype == 1)
printf("Are you at war with your target?\n>");
if (war == 'y')
gpt = 80.0; // gains per thief at war
rl = 0.1; // resources lost
//set units to gc
else if(war == 'N')
gpt = 52.0; //gains per thief not at war
rl = 0.1; //resources lost not at war