according to www.lookuptables.com, ASCII 251 should be a square root character. but when I enter
in my source, it shows this: ¹ (exponential 1). What is wrong?Code:(char) 251
according to www.lookuptables.com, ASCII 251 should be a square root character. but when I enter
in my source, it shows this: ¹ (exponential 1). What is wrong?Code:(char) 251
Operating Systems:
- Ubuntu 9.04
- XP
Compiler: gcc
when I cout it to the console it is the root symbol, which leads me to believe maybe you are using this in windows.Originally Posted by Ideswa
Not all characters sets map all the extended ascii characters, so check the font you are using to see if it maps the root symbol to 251
Everything outside of 0x20 to 0x7F is dependent on your OS/Compiler/Font/Code Page or whatever.
Being a windows machine, who knows what code page / font you get by default.
It's likely to depend for starters on whether you're writing a console or a GUI program.
251 in unicode is a û
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.