lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Aug 19, 2013 3:51 AM, "Hao Wu" <wuhao.wise@gmail.com> wrote:

> While I couldn't remember where I read it from, but stream operator overloading didn't turn
> out to be a so-good solution because implicit type conversion could give you the "wrong"
> result

I don't remember where this came from either:

unsigned char c = 0xf8;

/* c may have the high bit set; mask it off to get the ASCII */

/* careful with that axe */
cout << c&0x7f;