views:

604

answers:

4

While compiling some code I receive the following:

"error C2018: unknown character '0x40'"

I wonder how to resolve such issue?

+1  A: 

Here is where I would begin:

  • Have you included any non-standard include files? If so, check those for errors.

  • Have you missed a semi-colon somewhere?

  • Have you accidently used object > data instead of object -> data anywhere in your code?

  • Have you copied the code from one machine (OS) to another, causing encoding issues?

Sev
A: 

Open offending .c file in hex editor and search for 0x40. Maybe some unicode or utf8 string made it into ascii file.

Eugene
+1  A: 

Character 0x40 is '@' in ascii, iso-8859-1, utf-8 and many other encodings. It's also not part of the basic character set in C so should not appear in your source except possibly in a character or string literal or a comment. How are you using it and what are you trying to do?

Charles Bailey
A: 

The problem was simply in NOT including the header that contains #define MYSQL_VERSION_ID which was referred in offended code.

Roman Kagan