Display Slovene letters in a string

Jul 26, 2014 at 8:52pm
Hello, I'm new here!

I've just started C++ and I'm using Code:Blocks for now.

I want to 'cout' the letter Č from the Slovene alphabet. I've been searching online for a while with no luck.

I found this
http://www.ascii-codes.com/cp852.html

...and Č is on the list. I tried \xAC but had a weird char pop up instead. What am I doing wrong?



Last edited on Jul 27, 2014 at 3:54am
Jul 26, 2014 at 9:30pm
It depends on what you are using. On Linux you normally don't need to do anything special.

1
2
// this works fine for me
std::cout << "Č" << std::endl;


On Windows it's a bit more problematic. I'm not sure exactly how to do it.
Last edited on Jul 26, 2014 at 9:32pm
Jul 27, 2014 at 4:20am
I'm using Windows 8. After some online research, I'm guessing that since my programs run in Windows command prompt, it can only do the DOS special characters.

Could I easily make programs displaying 'Č' if I used another editor/compiler such as Visual C++ or something?

Maybe I should invent Č++ ...(bad joke)
Jul 27, 2014 at 6:03am
Last edited on Jul 27, 2014 at 6:04am
Jul 28, 2014 at 2:52pm
Thanks for the link, i tried the code but I think I'm still restricted by the DOS standard char set. On a side note, I tried installing Code Blocks editor on my wife's MacBook. The 'Č' outputs just fine using my original program, though Code Blocks spat out an error about using an illegal character.
Topic archived. No new replies allowed.