编辑结构体,出现的问题
#include<stdio.h>
#include<stdlib.h>
struct stu_type
{
char name[10];
long num;
int age;
char sex;
};
main()
{
void list(struct stud_type student);
struct stu_type student[3],*p;
int i;
for(i=0,p=student;i<3;p++,i++)
{
printf("Enter all data of student:");
scanf("%s,%ld,%d,%c\n",p->name,&p->num,&p->age,&p->sex);
}
for(i=0;i<3;i++)
list(student[i]);
}
void list(struct stud_type student)
{
printf("%-20s%8ld%6d%3c\n",student.name,student.num,student.age,student.sex);
}
--------------------Configuration: hbsh - Win32 Debug--------------------
Compiling...
hbsh.cpp
d:\microsoft visual studio\myprojects\proj\hbsh.cpp(12) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
执行 cl.exe 时出错.
hbsh.obj - 1 error(s), 0 warning(s)