Reputation: 31
I tried:
#define EURO char(128)
cout << EURO ; //only worked on my windows desktop, not linux
Or is there a character similar to the euro sign to display ?
Upvotes: 1
Views: 265
Reputation: 44258
According to this https://www.compart.com/en/unicode/U+20AC following should work if you Linux session configured to use UTF-8
std::cout << "\xe2\x82\xac" << std::endl;
Note it has to be a string literal not a single char as there are 3 bytes in UTF8 encoding for euro.
Upvotes: 2