I need to create string with special characer defined in HEX format:
std::string s = "\xFEd" ;
error C2022: '65242' : too big for character
In case std::string s = "\xFE d" ;
everything goes fine. How to tell string constructor treat "d" as string "d" and not numeric definition character in first case?
You wrote in tags "visual C++" so I assume Microsoft compiler from Visual Studio.
Please review the reference and examples at this site. It tells what you should use, but it seems .. a little buggy. For example:
and few pagedowns later, examples:
Note the
\x0pqr
thing. Fun! I'd suspect compilation error, but no!(..)
I've just found exact answer on MSDN: short info and long info. Exerpt from the latter: