| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 568 人关注过本帖
标题:为什么没有结果呀?
取消只看楼主 加入收藏
wwiilla
Rank: 1
等 级:新手上路
帖 子:51
专家分:0
注 册:2005-9-5
收藏
 问题点数:0 回复次数:1 
为什么没有结果呀?

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>

#define LIST_INIT_SIZE 32
#define LISTINCREMENT 10

struct Stu {
float chinese;
float english;
float database;
float math;
};


typedef struct {
Stu *elem;
int length;
int listsize;
}StuList;

void ScanScore( Stu &L ) {
printf("chinexe:");
scanf("%f",&L.chinese);
printf("\nenglish:");
scanf("%f",&L.english);
printf("\ndatabase:");
scanf("%f",&L.database);
printf("\nmath:");
scanf("%f",&L.math);
printf("\n");
}


int InitList_Stu ( StuList &L ) {
L.elem = ( Stu * )malloc( LIST_INIT_SIZE * sizeof( Stu ));
if( !L.elem ) exit( -2 );
L.length = 0;
L.listsize = LIST_INIT_SIZE;
return 1;
}
int main ()
{
Stu a ;
ScanScore( a );
StuList b;
b.elem = &a;
printf("%f",b.elem);
free( b.elem );
return 1;
}

搜索更多相关主题的帖子: 结果 
2006-05-10 22:58
wwiilla
Rank: 1
等 级:新手上路
帖 子:51
专家分:0
注 册:2005-9-5
收藏
得分:0 

肯不是这个问题了..

2006-05-11 12:02
快速回复:为什么没有结果呀?
数据加载中...
 
   



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

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