Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to interpret "error C2018: unknown character '0x40'? [closed]

While compiling some code I receive the following:

"error C2018: unknown character '0x40'"

I wonder how to resolve such issue?

like image 968
Roman Kagan Avatar asked Jul 23 '09 04:07

Roman Kagan


3 Answers

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?

like image 78
Sev Avatar answered Oct 20 '22 23:10

Sev


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?

like image 40
CB Bailey Avatar answered Oct 20 '22 22:10

CB Bailey


I've just got this error, but complaining about character '0x6', compiling a CPP file with Visual Studio 2010. And I got rid of it rewriting the line that was causing the error (writing the very same line above the old one, and deleting the old one).

like image 1
rturrado Avatar answered Oct 21 '22 00:10

rturrado