Too many types in declaration!
程序代码如下:
#include <stdio.h>
#include <string.h>
struct node
{
struct node * prev;
char * name;
char * qq;
char * mobilephone;
char * email;
struct node* next;
}
struct node * newnode()//tc在此行提示“Too many types in declaration!”,什么原因啊?急!
{
struct node * p;
printf("\nenter your name:");
gets(p->name);
printf("\nenter your qq:");
gets(p->qq);
printf("\nenter your mobilephone:");
gets(p->mobilephone);
printf("\nenter your email:");
gets(p->email);
return (p);
}
void printnode(struct node * p)
{
printf("\nthe name you entered is:%s",p->name);
printf("\nthe qq you entered is:%s",p->qq);
printf("\nthe mobilephone you entered is:%s",p->mobilephone);
printf("\nthe email you entered is:%s",p->email);
return;
}
main()
{
struct node * n1;
clrscr();
n1=newnode();
printnode(n1);
exit(1);
}