Code::Blocks Forums
User forums => Help => Topic started by: Pedro Luis on March 01, 2016, 05:44:19 pm
-
(http://s10.postimg.org/hh456uk5j/eror_Codeblocks.png)
//////////////////////////////////////
// Character Ñ failed,
// Mistake variable, depending on the character that precedes to hex \xa4
//
//////////////////////////////////////
#include <iostream>
using namespace std;
int main()
{
std::cout<<"\n Jos\x82 "; //José
std::cout<<"\n Espa\xa4a"; //España
std::cout<<"\n Espa\xa4 a"; //Españ a
std::cout<<"\n Espa\xa4e"; //Españe
std::cout<<"\n Espa\xa4i"; //España
std::cout<<"\n Espa\xa4o"; //España
std::cout<<"\n Espa\xa4u"; //España
return 0;
}
-
Not related to Code::Blocks and therefore violating our forum rules.
Anyway, you can insert a double-double-quote after the hex-escape-sequence, that represents the ñ.
-
Thank you for the advice.
This just happens in hex. \xa4 +a or +e (works well with i, o, u)
Ñ-ñ on Decimal and Octal all works well.
My English is very basic, but I understand you:
Ex. cout<<"Espa\xa4""a"; //Works correctly
but cout<<"Espa\244a"; //in Octal it's faster to write
I hope this help other users that happens this strange error.