C语言程序编译错误 request for member 'num' in something not a structure or union
2014-03-30 15:23
826 查看
一般是.与->搞错了。如果它是地址,就在它后边用->,如果它不是地址,就在它后边就用.
------------------------------------------------------------
http://zhidao.baidu.com/link?url=geojS7y1XPvrgXoib_jSBguu3SCmoddUTxZ1XyEiyS1G4wr1VHbSx5r2xdypdcnpofAKUL4mGX6m3TtY0gEdZ_
我有更好的答案
分享到:
按默认排序|按时间排序
评论|16
2013-02-20 11:01jimmy_fk|二级最快回答
评论|03
2010-01-01C语言程序编译问题2
2013-03-09请问一下各位,下面的c语言程序编译出现一个error,请问错哪...3
2009-06-12帮我看看这个c语言程序为什么编译失败2
2010-06-03C语言程序编译成功了,为什么连接还出错4
更多关于error:requestformember''insomethingnotastructureorunion的问题>>
2008-08-13C语言程序软件下载96
2009-07-01求一C语言程序源代码17
2014-01-12c语言程序编译失败1
2009-04-22c语言程序下载34
更多关于c语言程序的问题>>
0回答芳村客运站有去惠州博罗杨村的车吗?
1回答10eclipse出错 打不开 一打开就报错
2回答求一道英语题,急! All the policemen want to catch ( )thro
1回答新手学Android求帮助
0回答那芳村为什么事砍人
0回答Eclipse中源码在SDKmanager中不能成功运行为什么
1回答30try catch 捕获不到后台异常
0回答5Android4.4请问各路大神,要编程序接下来应该怎么做啊?
1回答芳村哪里有鸡玩
0回答在平板电脑上使用eclipse怎么样
0回答谁有48GROUP的Catch phrase的音频文件
1回答10android怎么实现SQlite数据库的连接?最好详细些
0回答芳村 婚宴 哪里好
1回答荐几本有安卓即时通信例子的书,最好是用eclipse软件,java编写的,...
更多等待您来回答的问题>>
不是人人都能闻到草香
登录
还没有百度账号?立即注册
精彩知识在知道
知道君在微博、微信等你!
2014春节必备的14个锦囊
关于H7N9的常识与误区
爱知道,解答你的青春期困惑
帮助 | 意见反馈 |
投诉举报 |
知道协议 |
加入我们
©2014 Baidu
使用百度前必读 | 百度知道开放平台
------------------------------------------------------------
http://zhidao.baidu.com/link?url=geojS7y1XPvrgXoib_jSBguu3SCmoddUTxZ1XyEiyS1G4wr1VHbSx5r2xdypdcnpofAKUL4mGX6m3TtY0gEdZ_
如题 源程序如下: #include<stdio.h> #include<stdlib.h> struct student { int xuehao; char name[10]; char sex; char num[5]; int age; char ID[20]; char depart[20]; char destination[20]; char date[10]; char kind[4]; }; int main() { FILE *fp; struct student acm[1000]; int i,flag=1,flag2=0; char choose; for(i=0;i<1000;i++) { acm[i].xuehao=0; } fp=fopen("d:\\text.txt","r"); i=0; while(!feof(fp)){ fscanf(fp,"%d %s %c %s %d %s %s %s %s %s",&acm[i].xuehao,acm[i].name,&acm[i].sex,acm.num,&acm[i].age,acm[i].ID,acm[i].depart,acm[i].destination,acm[i].date,acm[i].kind); i++; } fclose(fp); while(1) { printf("A: Add\nD: Delete\nM: Modify\nQ: Query\nS: Statistics\nE: Exit\n"); printf("Please choose from A,D,M,Q,S and E\n"); printf("What do you want to do?:"); if(flag2==1) getchar(); flag2=1; scanf("%c",&choose); getchar(); switch(choose) { case 'A':printf("\n");break; case 'D':printf("\n");break; case 'M':printf("\n");break; case 'Q':printf("\n");break; case 'E':{printf("\n"); fp=fopen("d:\\text.txt","w"); for(i=0;acm[i].xuehao!=0;i++){ if(acm[i].xuehao==-1) continue; fprintf(fp,"%d %s %c %s %d %s %s %s %s %s\n",acm[i].xuehao,acm[i].name,acm[i].sex,acm.num,acm[i].age,acm[i].ID,acm[i].depart,acm[i].destination,acm[i].date,acm[i].kind); } fclose(fp); flag=0;break;} default:printf("sorry,your choice is error!\n\n\n\n");break; } } return 0; }
我有更好的答案
分享到:
按默认排序|按时间排序
2条回答
2013-02-20 13:54liuhongchun189|五级根据提示,直接把两处的acm.num改成acm->num不就行啦。
评论|16
2013-02-20 11:01jimmy_fk|二级最快回答
我来做个任务,路过
评论|03
其他类似问题
2013-12-22c语言程序编译出错,帮帮忙?32010-01-01C语言程序编译问题2
2013-03-09请问一下各位,下面的c语言程序编译出现一个error,请问错哪...3
2009-06-12帮我看看这个c语言程序为什么编译失败2
2010-06-03C语言程序编译成功了,为什么连接还出错4
更多关于error:requestformember''insomethingnotastructureorunion的问题>>
c语言程序的相关知识
2013-11-03C语言程序无法编译。52008-08-13C语言程序软件下载96
2009-07-01求一C语言程序源代码17
2014-01-12c语言程序编译失败1
2009-04-22c语言程序下载34
更多关于c语言程序的问题>>
等待您来回答
0回答我们是南京资深嵌入式技术团队,能根据用户需求完整提供工控行业An...0回答芳村客运站有去惠州博罗杨村的车吗?
1回答10eclipse出错 打不开 一打开就报错
2回答求一道英语题,急! All the policemen want to catch ( )thro
1回答新手学Android求帮助
0回答那芳村为什么事砍人
0回答Eclipse中源码在SDKmanager中不能成功运行为什么
1回答30try catch 捕获不到后台异常
0回答5Android4.4请问各路大神,要编程序接下来应该怎么做啊?
1回答芳村哪里有鸡玩
0回答在平板电脑上使用eclipse怎么样
0回答谁有48GROUP的Catch phrase的音频文件
1回答10android怎么实现SQlite数据库的连接?最好详细些
0回答芳村 婚宴 哪里好
1回答荐几本有安卓即时通信例子的书,最好是用eclipse软件,java编写的,...
更多等待您来回答的问题>>
知道日报
2014.3.29往期回顾不是人人都能闻到草香
登录
还没有百度账号?立即注册
精彩知识在知道
知道君在微博、微信等你!
2014春节必备的14个锦囊
关于H7N9的常识与误区
爱知道,解答你的青春期困惑
帮助 | 意见反馈 |
投诉举报 |
知道协议 |
加入我们
©2014 Baidu
使用百度前必读 | 百度知道开放平台
相关文章推荐
- JNI_OnLoad编译错误:request for member 'GetEnv' in something not a structure or union
- JNI_OnLoad编译错误:request for member 'GetEnv' in something not a structure or union
- C 语言编译时报错 request for member''in something not a structure or union
- JNI遇到error: request for member 'FindClass' in something not a structure or union
- error: request for member 'FindClass' in something not a structure or union
- Jni使用过程中出现 error: request for member 'FindClass' in something not a structure or union,解决办法
- request for member 'flags' in something not a structure or union
- JNI遇到error: request for member 'FindClass' in something not a structure or union
- JNI遇到error: request for member 'FindClass' in something not a structure or union
- JNI遇到error: request for member 'FindClass' in something not a structure or union
- JNI遇到error: request for member 'FindClass' in something not a structure or union
- error: request for member 'nameLabel' in something not a structure or union 的原因
- error: request for member ‘on_url’ in something not a structure or union
- C语言实现顺序线性表及request for member''in something not a structure or union
- android JNI之 'GetObjectClass' in something not a structure or union
- 编译报request for member '***' in something not a structure or union的原因,以及解决方法
- OSCache的源码编译Cache.java 文件报add(Class, T) in the type EventListenerList is not applicable for the arguments 错误的解决
- qt 错误:request for member 'show' in 'showlist_ui', which is of non-class type 'ShowList*'
- linux下编译c++程序遇到 error: ‘thread’ is not a member of ‘std’的错误
- VB6:关于“Only public user defined types defined in public object modules can be used as parameters or return types for public procedures of class modules or as fields of public user defined types.”的编译错误