when i run the program i get
card.c:3:23: error: dereferencing pointer to incomplete type printf("%i", attacker->power);
main.c:
#include <stdio.h>
#include "card.h"
int main(){
return 0;
}
card.h:
#ifndef CARD_H_FILE
#define CARD_H_FILE
struct card_t {
char name[10];
int power, health, mana_cost;
};
int attack(struct card_t *, struct card_t *);
#endif
card.c:
int attack(struct card_t *attacker, struct card_t *defender){
printf("%i", attacker->power);
return 1;
}
#include "card.h"?