C++ weirdness

 

I’m not sure if it’s an official C++ weirdness or just Microsoft’s version.

But this seems to be legal C++ code as I discovered by accident (=bug).

long x=0;
CString s = x[“test”];  // No compiler warning. Result is “t”

Tags:

Comments are closed.