Forum: C Dec 23rd, 2008 |
| Replies: 2 Views: 322 Like salem said, you would be better off with a decent compiler such as gcc. If its not a problem with your compiler, then I'd guess you are not linking the library properly. Its been a while, but I... |
Forum: C Dec 23rd, 2008 |
| Replies: 7 Views: 740 You might want to take a look at strtok (http://www.cplusplus.com/reference/clibrary/cstring/strtok.html). |
Forum: C Aug 22nd, 2008 |
| Replies: 21 Views: 2,747 Yes, but first you are going to have to learn how to read. You could practice with this (http://www.catb.org/~esr/faqs/smart-questions.html). Then learn how to converse with other people... |
Forum: C Aug 22nd, 2008 |
| Replies: 8 Views: 1,187 Something like:
int card = 39;
char suit = (card / 10)+'A';
int rank = (card % 10)+1;
printf("suit: %c, rank: %d", suit, rank);
IMO the easiest way to do this would be to load the entire... |
Forum: C Aug 22nd, 2008 |
| Replies: 21 Views: 2,747 Since the result is a float I still reckon the easiest way to go about it would be to use sprintf and parse the string, but the op dosent seem to be interested in that idea :/ |
Forum: C Aug 20th, 2008 |
| Replies: 21 Views: 2,747 Have you tried converting the result to a string yet? that should make a good first step. |
Forum: C Aug 20th, 2008 |
| Replies: 8 Views: 1,187 You should be able to store the data for each card within an integer. You could then get the suit as card / 10 and you could get the rank as card % 10. I find this approach simplifies things a... |
Forum: C Aug 20th, 2008 |
| Replies: 21 Views: 2,747 If I was doing this I think I would use sprintf to convert the numeric result to a string then parse the characters building the words from it:... |