|
-
March 3rd, 2011, 09:39 AM
#1
Sorting string by arbitrary method
I'm programming a card game and want to be able to sort by value, so if someone has an Ace "A", then that would have a higher value than someone with a 10, 'T', or a Jack 'J'. I'm been looking through by STL book, but can't quite find a way to do this. I assume I though I would be able to put these keys in a map and then associate a value to them, but I want the value to only apply to the first character in the string (since all the string will have 2 values, the card and the card suite, so a string would be like 'As' for Ace of spades). Thanks.
Sysop1911
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|