I have more to the code but i was just explaining what part i was stuck on :). Many thanks for your reply! Could you please give me an example and i can proceed from there! :) im newish to C :)
Type: Posts; User: MF1991
I have more to the code but i was just explaining what part i was stuck on :). Many thanks for your reply! Could you please give me an example and i can proceed from there! :) im newish to C :)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char* shortValue; /* within structure, contains card value */
char shortSuit[5]; /* within structure,...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char* shortValue; /* within structure, contains card value */
char shortSuit[5]; /* within structure,...
case '2':
sprintf(cards[i].value, "Two");
cards[i].valueAmount = 2;
break;
case '3':
sprintf(cards[i].value,...
can you give me an example on how i can implement and place it within my code plz? :)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char* shortValue;
char shortSuit[5];
char value[20];
char suit[20];
char valueAmount[13];
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char* shortValue;
char shortSuit[1];
char value[20];
char suit[20];
} CARD;
Like this?
[code]
case '2':
sprintf(cards[i].value, "Two");
cards[i].valueAmount[0] = 2;
break;
Something like this?
int valueAmount[13];
valueAmount[0] = "2";
valueAmount[1] = "3";
valueAmount[2] = "4";
valueAmount[3] = "5";
well i tried doing that but i kept getting error messages. do u have teamviewer 8 so i can possibly show you what i am doing so you can provide me with an answer and see for yourself? :)
i have a 5 card input like 5H 6D 8C 7S 4H and when i put them in, i want it to sort them in a list like this:
4H
5H
6D
7S
8C
but when i display them, it will print the names and of and then...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
Link is in the above reply (: i really need help on this.
So sorry people, im new to this forum!
this is my code, i hope you will be able to help!
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct - Pastebin.com
i am new to C and new to the forum, i really need help in order to get my data sorted for this poker game. i need it to go from highest value to lowest in a 5 card hand.
please help me and then i...
any idea at all anyone? please! (:
would anyone be able to help me sort this data so when i input the values, they will be in order. Highest to lowest.
such as:
Ace
King
Nine
Seven
Five
what about using bubblesort? and what about if you have letters value? can i send u an example of my code in a private message?
hi, im new to C and wondering how i would be able to sort certain data so it goes from highest to lowest. such as :
9 8 7 6 5 when inputted using a compiler.
what would be the best way and how...