您的位置:首页 > 其它

0x00AE18F8 处有未经处理的异常: 0xC0000005: 读取位置 0x00000020 时发生访问冲突。

2014-08-01 11:58 323 查看
代码如下:

#include<stdio.h>
#include<string.h>
struct DON_STUD_STR
{
long num;
char name[20];
float score;
int mark;
struct DON_STUD_STR * next;
};
这个函数为什么老是出错
struct DON_STUD_STR * DON_STUD_BRO(struct DON_STUD_STR *head)
{
struct DON_STUD_STR * p1;
p1 = (struct DON_STUD_STR *)malloc(sizeof(struct DON_STUD_STR));
p1 = head->next;
while (p1 != NULL)
{
printf("%-20s%-20s%-20s%-20s", "选好", /*"名字",*/ "成绩", "标记");
printf("%-20d\n", p1->num);
//printf("%-20d\n", p1->name);
printf("%-20f\n", p1->score);
printf("%-20d\n", p1->mark);
p1 = p1->next;
}
return(head);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐