| 编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛
全能ASP/PHP/ASP.NET主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付学习型 ASP/PHP/ASP.NET 主机 30元/年
高端软件开发 = 年薪十万不是梦赛孚耐:软件保护加密专家身份认证令牌USB KEY 
共有 455 人关注过本帖
标题:error C2064: term does not evaluate to a function
收藏  订阅  推荐  打印 
cancerhd
Rank: 1
等级:新手上路
帖子:13
积分:230
注册:2007-7-25
error C2064: term does not evaluate to a function


附件: 只有本站会员才能下载或查看附件,请您 登录注册
搜索更多相关主题的帖子: term  does  function  evaluate  
2007-8-2 15:37
medicihophy
Rank: 2
等级:注册会员
威望:1
帖子:102
积分:1120
注册:2007-7-28

我看了你的程序,你类的设计都有点问题!

2007-8-2 15:53
cancerhd
Rank: 1
等级:新手上路
帖子:13
积分:230
注册:2007-7-25

你有qq么,联系的方便点

2007-8-2 15:59
medicihophy
Rank: 2
等级:注册会员
威望:1
帖子:102
积分:1120
注册:2007-7-28

#include<iostream>
using std::cout;
using std::endl;
class Time
{
public:
Time();
void setTime(int ,int, int);
void printMilitary();
void printStandard();

private:
int hour;
int minute;
int second;


};
Time::Time()
{
hour = minute = second = 0;
}

void Time::setTime(int h,int m,int s)
{
hour = (h >= 0 && h <= 24)?h:0;
minute = (m >= 0 && m<= 60)?m:0;
second = (s >= 0 && s<= 60)?s:0;
}

void Time::printMilitary ()
{
cout<<(hour < 10 ?"0" :" ")<<hour<<":"
<<(minute < 10 ?"0" :" ")<<minute;

}

void Time::printStandard ()
{
cout<<((hour == 0 || hour ==12 ) ?
12 : hour & 12)
<<":"<<(minute < 10 ? "0" : " ")<<minute
<<":"<<(second < 10 ? "0" : " ")<<second
<<(hour < 12 ? "AM" : "PM");
}

int main()
{
Time t;

cout<<" the initial military time is: ";
t.printMilitary();
cout<<"the initial standard time is: ";
t.printStandard();

t.setTime(13,27,6);
cout<<"\n\n Military time after setTime is: ";
t.printMilitary();
cout<<"the standard time after setTime is: ";
t.printStandard();

t.setTime(99,99,99);
cout<<"\n\n after attempting invalid setting: "
<<"\n military time:";
t.printMilitary();
cout<<"\nstandard time:";
t.printStandard();
cout<<endl;

return 0;
}
这是改后的,你自己再分开!


2007-8-2 16:00
medicihophy
Rank: 2
等级:注册会员
威望:1
帖子:102
积分:1120
注册:2007-7-28

说你的吧,我加你

2007-8-2 16:01
cancerhd
Rank: 1
等级:新手上路
帖子:13
积分:230
注册:2007-7-25

283699636
2007-8-2 16:05
cancerhd
Rank: 1
等级:新手上路
帖子:13
积分:230
注册:2007-7-25

分开了还是有错误呀。
2007-8-2 16:37
medicihophy
Rank: 2
等级:注册会员
威望:1
帖子:102
积分:1120
注册:2007-7-28

把你分开的再发出来

2007-8-2 16:38
关于我们 | 广告合作 | 编程中国 | 清除Cookies | Archiver | WAP | TOP

编程中国 版权所有,并保留所有权利。鲁ICP备08000592号
Powered by Discuz, Processed in 0.063098 second(s), 9 queries.
Copyright©2004-2008, BCCN.NET, All Rights Reserved