首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

大家来帮小弟我看看哦~

2012-02-15 
大家来帮我看看哦~~#includestdio.h#defineNULL0structstudent{longnumfloatscorestructstudent*next

大家来帮我看看哦~~
#include   <stdio.h>
#define   NULL   0
struct   student
{long   num;
float   score;    
struct   student   *next;
};
void   main()
{struct   student   a,b,c,*head,*p;
a.num=10101;a.score=89;
b.num=10103;b.score=90;
c.num=10105;c.score=37;
head=&a;
a.next=&b;
b.next=&c;
c.next=NULL;
p=head;
do
      {printf( "%1d%5.1f\n ",p-> num,p-> score);
      p=p-> next;
      }while(p!=NULL);
}
照着书打运行都会错误   太打击初学者信心了   忽忽~~
能说说什么问题吗

[解决办法]
哪里错了??我vc++6.0通过编译 正常运行
[解决办法]
看代码没什么问题,应该可以运行!!!

[解决办法]
换个vc++6.0吧
应该是你的开发环境有问题

热点排行
Bad Request.