'how to output euro symbol(using Xcode)

I got a problem with output a euro currency symbol in the Xcode console

Here is code but it doesn't work. Where is the mistake?

#include <iostream>
#include <locale>
#define EXIT_SUCCESS 0
int main()
{
   std::locale euro("de_DE.utf-8");
   std::cout << "Euro currency symbol " << std::use_facet<std::moneypunct<char>>(euro).curr_symbol() << std::endl;
return EXIT_SUCCESS;
}

I use std::moneypunct and the international unicode for currencies but in output I get just word EUR but not a currency symbol! Any help is appreciated and if its possible where I can find the locales for currencies which I pass inside the std::locale("") function? Thank you!!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source