Craps simulation

Hi, I'm trying to make a game that simulates craps that has to be functionally decomposed but I am getting errors that say:

Program5.cpp:210: error: stray '\342' in program
Program5.cpp:210: error: stray '\200' in program
Program5.cpp:210: error: stray '\223' in program
Program5.cpp: In function 'int NewBalance(int, int, char)':
Program5.cpp:210: error: expected ';' before 'wager'

I'm not exactly sure what they mean but here's the function that they're in.

1
2
3
4
5
6
7
8
9
10
11
12
int NewBalance(int bankBalance, int wager, char win)
{
	int newBalance;
	
	if(win == 'Y')
		newBalance = bankBalance + wager;
	else 
		if(win == 'N')
			newBalance = bankBalance – wager;   // line 210

	return newBalance;
}
You must have some weird characters in your version of the code. Delete the line (210) and type it in again.
Oh my gosh. That worked thank you!
Topic archived. No new replies allowed.