I'm trying to make some sort of database for cards for a cardgame similar to Final Fantasy VIII Triple Triad Card Game where each card has its name and scores on the top, bottom, left, and right sides of the card. I'm using arrays of structures. i can't compile it well because of errors. can anyone help me identify the erroneous part of this code? i've omitted some parts of it but basically the code below shows the meat of the program i want to make.
struct card_t {
char name[20];
int top, bottom, left, right;
};
int main(){
cardslist(); //is this the right way to call cardslist?
return 0;
}
void cardslist(){
struct card_t card[100];
card[0].name = "geezard"; //errors occur from this line onwards
card[0].top = 1;
card[0].bottom = 2;
card[0].left = 3;
card[0].right = 4;
card[1].name = "abadon";
card[1].top ........
card[2].name = ........
}
can anyone help me correct this code please? thanks!