| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 370 人关注过本帖
标题:课本照敲也有错,c
取消只看楼主 加入收藏
经哥
Rank: 3Rank: 3
来 自:代码空间
等 级:论坛游侠
威 望:1
帖 子:289
专家分:124
注 册:2012-9-8
结帖率:91.8%
收藏
已结贴  问题点数:20 回复次数:2 
课本照敲也有错,c
#include"stdio.h"
#include"stdlib.h"
struct stud_type
{
    char name[20];
    long num;
    int age;
    char sex;
   
};
   main()
 {
     void list(struct stud_type student);
     struct stud_type student[3],*p;
     int i;
     char numstr[20];
     for(i=0,p=student;i<3;p++,i++)
     {
         printf("Enter all data of student[%d]:\n",i);
         scanf("%s%ld%d%c",p->name,&p->num,&p->age,&p->sex);
     }
     for(i=0;i<3;i++)
       list(student[i]);
 }
    void list (student)
   
   struct stud_type student;
   {
        printf("%-20s%8ld%6d%3c\n",student.name,student.num,student.age,student.sex);
   }
 
   
   
   我真的不知道怎么改了,求指教
搜索更多相关主题的帖子: Enter void include 课本 
2012-10-30 10:46
经哥
Rank: 3Rank: 3
来 自:代码空间
等 级:论坛游侠
威 望:1
帖 子:289
专家分:124
注 册:2012-9-8
收藏
得分:0 
回复 2楼 wxmshawn
为什么我的C-free运行还是有错你。55555555555

我只是个演员,还是业余的!!
2012-10-30 11:32
经哥
Rank: 3Rank: 3
来 自:代码空间
等 级:论坛游侠
威 望:1
帖 子:289
专家分:124
注 册:2012-9-8
收藏
得分:0 
回复 3楼 wp231957
那你看看有错吗??我运行就是在定义函数那里错了。。

我只是个演员,还是业余的!!
2012-10-30 11:33
快速回复:课本照敲也有错,c
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011548 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved