Mi scuso in anticipo per la domanda stupida!Stampa di un Char *
Ecco il mio struct DEF:
struct vcard {
char *cnet;
char *email;
char *fname;
char *lname;
char *tel;
};
Sto provando a stampare una rappresentazione di questa struct con la funzione vcard_show (vCard * c), ma il compilatore sta gettando indietro un avvertimento:
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);
}
Quando compilato: "warning: formato '% c' si aspetta tipo 'int', ma l'argomento 2 ha tipo 'char *'"
non è% c il simbolo per char *?
Grazie mille! –