I am developing a card game and want to print out the symbol of the heart, diamonds, spades and clubs. My target platform will be Linux.
On Windows, I know how to print these characters. For example, to print a heart (in ASCII), I wrote ...
#include <iostream>
using std::cout;
using std::endl;
int main()
{
char foo = '\3';
cout << heart << endl;
system ( "PAUSE" );
return 0;
}
However, as I mentioned, the heart symbol will not be printed on Linux. Is there a standard library that can be used to print a symbol for hearts, diamonds, spades and clubs on Linux and Windows? So far I have been studying Unicode, as I understand that this is universal.
Thanks for any help.
source
share