why this program display this error:
why this program display this error:
[6 main.c two or more data types in declaration of `info_input']
please help me with this problem , source code as following.
//source code :
//file main.c
#include <stdio.h>
#include <my_lib.h>
void info_input()
{
struct tongxun *p;
p = (struct tongxun*)malloc(sizeof(struct tongxun));
p->id = "97100456";
p->name = "rochelle hsu";
p->email = "[email protected]";
p->oicq = "17731056";
free(p);
return;
}
int main(int argc, char *argv[])
{
//input personal infomation
info_input();
//printf("%s",p->name);
return 0;
}
//file my_lib.c
//define the struct tongxun
struct tongxun
{
char *id;
char *name;
char *email;
char *oicq;
char *home_phone;
char *mobile_phone;
}
mail me to : rjhome