stray \20 compiler error

I get these errors from a header page within my program:

ScorePlayerMatch.h:20: error: stray '\20' in program
ScorePlayerMatch.h:21: error: stray '\20' in program
ScorePlayerMatch.h:22: error: stray '\20' in program
ScorePlayerMatch.h:21: error: parse error before numeric constant
ScorePlayerMatch.h:22: error: parse error before numeric constant
ScorePlayerMatch.h:20: error: parse error before numeric constant


Here is the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <Carbon/Carbon.h>
struct scoreMatch {
	double scoreArr[5][2];
}ScorePlayerMatch();

scoreMatch ScorePlayerMatch(double pair, double threeKind, double twoPair, double fourKind, double fullHouse, double pairCard, double secPairCard, double threeKindCard, double highC, double lowC)
{
	scoreMatch infunc;
	infunc.scoreArr[0][0] = pair; infunc.scoreArr[0][1] = 2000000 + (pairCard * 10000) + highC + (lowC/100);
	infunc.scoreArr[1][0] = threeKind; infunc.scoreArr[1][1] = 4000000 + (pairCard * 10000) + (highC) + (lowC/100);
	infunc.scoreArr[2][0] = twoPair; infunc.scoreArr[2][1] = 3000000 + (pairCard* 10000) + (secPairCard*100) + (highC) + (lowC/100);
	infunc.scoreArr[3][0] = fourKind; infunc.scoreArr[3][1] = 8000000 + (pairCard*10000) + (highC) + (lowC/100);
	infunc.scoreArr[4][0] = fullHouse; infunc.scoreArr[4][1] = 7000000 + (pairCard*10000) + (threeKindCard*100) + (highC) + (lowC/100);
		
	return infunc;
}


For whatever reason, I can't solve this problem...any ideas as to why this error occurs?
What I am seeing in your code snippet is that lines 11, 12, and 13 all have something odd between the 3, 8, and 7 and the following six zeros.

(I can't tell what character was originally there.)

Numeric constants in C and C++ should not have anything between digits.
thanks...there is some mystery space between the 8 & 0..3 & 0...7 & 0...

...weird...thanks again


you can see space by copying the code above and pasting it...
Last edited on
Topic archived. No new replies allowed.