Bruce Schneier has a wrong function !!!

i got this source from a book of Bruce Schneier,Applied cryptography.
it's a shift register pseudo random number generator.
i read all of the function, i analysed it, i've found nothing wrong.
my VS2010 is telling me that it cannot recognize the hex constant 0x00000001.

the compiler points to line 13, with this message.
error C2146: syntax error : missing ';' before identifier '×00000001'


i'm sure everything is right, i suspect the compiler has to deal with that.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
 int LFSR () {
     static unsigned long ShiftRegister = 1;
     /* Anything but 0. */
     ShiftRegister = ((((ShiftRegister >> 31)
                ^ (ShiftRegister >> 6)
                ^ (ShiftRegister >> 4)
                ^ (ShiftRegister >> 2)
                ^ (ShiftRegister >> 1)
                ^ ShiftRegister))
                & 0×00000001)
                << 31)
                | (ShiftRegister >> 1) ;
     return ShiftRegister & 0×00000001;
}
The character × is wrong. It should be x.
man, you're a genius.
thanks.
Topic archived. No new replies allowed.