I apologize in advance for the stupid question!
Here is my def structure:
struct vcard { char *cnet; char *email; char *fname; char *lname; char *tel; };
I am trying to print a representation of this structure using the vcard_show (vcard * c) function, but the compiler throws a warning:
void vcard_show(struct vcard *c) { printf("First Name: %c\n", c->fname); printf("Last Name: %c\n", c->lname); printf("CNet ID: %c\n", c->cnet); printf("Email: %c\n", c->email); printf("Phone Number: %c\n", c->tel); }
At compilation: "warning: format"% c expects type "int", but argument 2 is of type "char *"
Isn't that the% character for the char * character?
Alex nichols
source share