Does plain ASCII output work?
“not getting output” is suspicious when printing text. Falling back to the simpler case may show whether there is a more basic problem somewhere.
By compiling and running the program I get an ASCII equivalent as output:
% g++ -Wall x.cpp
% ./a.out
Ellinika
which is quite interesting that it can even do that :D
Assuming my locale settings are non-optimal, I borrowed some locale settings from an example in cppreference https://en.cppreference.com/w/cpp/locale/setlocale and putting your code inside, I get
% g++ -Wall x.cpp
% ./a.out
New LC_ALL locale: en_US.UTF-8
Ελληνικά
Restorred LC_ALL locale: C
which is likely what you'd expect.
Hard-coding a locale works, but is likely a bad idea. So rather than forcing the program with a hard-coded locale, you'll want to fix this by configuring your environment properly. In that way, if a different person uses the program it will adapt itself to the locale of the different system. In particular it will not push text that the environment does not know how to handle.
In my case, the “C” locale that I have says it understands ASCII only, so no wonder I didn't get non-ASCII output.