'C++ not printing emojis as expected
I have the following extract of a program
int main(){
cout << "1) ✊\n";
cout << "2) ✋\n";
cout << "3) ✌️\n";
}
But at the time I run it I get strange texts like the following
====================
rock paper scissors!
====================
1) 
2) 
3) ԣÅ
This seems not to be related to my terminal but instead to a compilation result because if I run echo ✊ it shows as expected.
I'm currently using the following compilation commands and compiler version
g++ *.cpp -o rock_paper_scissors.exe
g++.exe (Rev9, Built by MSYS2 project) 11.2.0 Copyright (C) 2021 Free Software Foundation, Inc.
Finally, note that it was working before as expected, but at some point, it stopped working, I noticed after I used system("pause") which I'm guessing may have changed something on the compilation configurations as this is a Windows-only command, I delete such piece of code and still having the issue.
You can see the rest of the code here: https://github.com/guillene/RockPaperScissors
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
