声明中有两种或多种数据类型

joh*_*ner 2 c struct

#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
    struct student
    {
        char name[30];
        int roll_no;
        char add[40];
        char subject[15];
    }
    struct student p;

    printf("Enter the name of student:\t");
    scanf("%s",p.name);
    printf("Enter the roll no. of student:\t");
    scanf("%d",&p.roll_no);
    printf("Enter the address of student:\t");
    scanf("%s",p.add);
    printf("Enter student's subject:\t");
    scanf("%s",p.subject);
    printf("\nThus the name of student is:%s \nHis/her roll no is :%d \n He/she lives    at:%s \t and his subject is:%s",p.name,p.roll_no,p.add,p.subject);
    getch();
}
Run Code Online (Sandbox Code Playgroud)

错误信息是---

13error: two or more data types in declaration of `p'
Run Code Online (Sandbox Code Playgroud)

我正在使用代码块

Fer*_*eak 9

放一个;结构定义...