How can I get the card symbols like Hearts and Clubs?

I have made a card game in C++ and I stumbled across a set of symbols at run-time. I realised why, I had an array of 5 integers and the program was trying to retrieve the data from the 6th variable, which it shouldn't have done! I've fixed the problem now, but it was pointing to a set of symbols, which came from the location directly after the array, which could have been anything!

Anyway, these symbols that were appearing were conveniently exactly what I was after. I need the 4 symbols in a pack of cards, Clubs, Spades, Diamonds, and Hearts.

I was rather hoping it would be something simple like "s" for spades perhaps, like new line is "".

: I have made a card game in C++ and I stumbled across a set of symbols at run-time. I realised why, I had an array of 5 integers and the program was trying to retrieve the data from the 6th variable, which it shouldn't have done! I've fixed the problem now, but it was pointing to a set of symbols, which came from the location directly after the array, which could have been anything!: : Anyway, these symbols that were appearing were conveniently exactly what I was after. I need the 4 symbols in a pack of cards, Clubs, Spades, Diamonds, and Hearts.: : I was rather hoping it would be something simple like "s" for spades perhaps, like new line is "".: : Can someone please help me find these symbols?:

They usually place them on top of the ASCII table, 0 to 32, which is reserved for non-printable symbols. However, the symbols are not standard, so they may vary on different systems. Here is a simple program to check what symbols are stored there on your system:

: : I have made a card game in C++ and I stumbled across a set of symbols at run-time. I realised why, I had an array of 5 integers and the program was trying to retrieve the data from the 6th variable, which it shouldn't have done! I've fixed the problem now, but it was pointing to a set of symbols, which came from the location directly after the array, which could have been anything!: : : : Anyway, these symbols that were appearing were conveniently exactly what I was after. I need the 4 symbols in a pack of cards, Clubs, Spades, Diamonds, and Hearts.: : : : I was rather hoping it would be something simple like "s" for spades perhaps, like new line is "".: : : : Can someone please help me find these symbols?: : : : : They usually place them on top of the ASCII table, 0 to 32, which is reserved for non-printable symbols. However, the symbols are not standard, so they may vary on different systems. Here is a simple program to check what symbols are stored there on your system:: : [code]: #include: : int main(): {: int i;: for(i=0; i<32; i++): printf("%d: %c", i, i);: getchar();: return 0;: }: [/code]: : Expect a beep at 7 and a linefeed at 10 : : The symbols you are looking for are most likely:: : 3 hearts: 4 diamonds: 5 clubs: 6 spades: : meaning you could print them in strings as : : 'x03': 'x04': 'x05': 'x06': : (note that these are hex values, not decimal):