标题:请帮我看一看啊
只看楼主
HER
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-12-21
 问题点数:0 回复次数:3 
请帮我看一看啊
#include<stdio.h>
struct time{
float arriveTime;
float runTime;
float totalTime;
char name[];
};
void InputTime(struct time *ps)
{ps->name[]='aaaaaaa';//这条语句显示错信息:Expression syntax in  function inputTime
ps->runtime=10;
printf("%s\n",ps->name);

getch();
scanf("%",&ps->runTime);
getch();
};
main(){
struct time a[6];
stuct time *ps;
void InputTime(struct time *ps);
InputTime(a);
};

请指点啊
搜索更多相关主题的帖子: void function aaaaaaa 
2007-12-21 15:02
万兽无缰
Rank: 1
等 级:新手上路
威 望:1
帖 子:296
专家分:0
注 册:2007-8-27
得分:0 
错误太多
LZ先调调

女朋友问我想怎么死~~~
             我说我想"爽死"
2007-12-21 15:25
布拉莫斯
Rank: 1
来 自:中国太平洋舰队
等 级:新手上路
帖 子:169
专家分:0
注 册:2007-3-31
得分:0 
其实,我不知LZ这程序是表达什么意思的。。。。。

#include<stdio.h>
#include <stdlib.h>
#include<string.h>
struct time{
float arriveTime;
float runTime;
float totalTime;
//char name[];
char name[10];
};
void InputTime(struct time *ps)
//{ps->name[]='aaaaaaa';//这条语句显示错信息:Expression syntax in  function inputTime
{strcpy(ps->name,"aaaaaaa");
//ps->runtime=10;
ps->runTime=10;
printf("%s\n",ps->name);

//getch();
scanf("%",&ps->runTime);
//getch();
};
main(){
struct time a[6];
struct time *ps;
void InputTime(struct time *ps);
InputTime(a);
};

真理往往掌握在少数人手中,可现实却是少数服从多数!
2007-12-21 16:22
HER
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-12-21
得分:0 
谢谢
2007-12-24 14:24



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-193694-1-1.html




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

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