Hiya,

Im trying make a simple cards game and i was wondering how in c++ can i use the characters ♠ ♣ ♥ ♦ , i think it would be betetr than me printing out the words each time, Are these in some extended character set anywhere? i tried googling but i could only find html versions like &spades; or xsl <spade/>.

Anyone know how i could print the ♠ ♣ ♥ ♦ symbols in a console application?

Thanks for your time

These should output the same characters.

char *hearts  = "\x03";  //♥
char *diamond = "\x04";  //♦
char *clubs   = "\x05";  //♣
char *spades  = "\x06";  //♠
cout << "♠ ♣ ♥ ♦" << endl;

does the trick.

Nice one,
I had made a function that looped through all the 0-256 char's but coudlent find it, maybe it was because i was using it as unsigned i dunno, but that works perfect thanks allot :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.