题目:
-
国际通话账单会根据时间调整:
文件的第一行为从00:00 - 01:00, 01:00 - 02:00…的价格
第2行为总话单数目
第3行~,为话单:
月:日:时:分
CYLL 01:01:06:01 on-line
CYLL 01:28:16:05 off-line
on-line上线
off-line 下线 -
记录会有一定问题,需要忽略掉:
-
只有on-line,没有off-line;或者只有off-line,没有on-line
-
试着给出统计用户的账单(用户名:总分钟数,价格)
数据:
10 10 10 10 10 10 20 20 20 15 15 15 15 15 15 15 20 30 20 15 15 10 10 10
10
CYLL 01:01:06:01 on-line
CYLL 01:28:16:05 off-line
CYJJ 01:01:07:00 off-line
CYLL 01:01:08:03 off-line
CYJJ 01:01:05:59 on-line
aaa 01:01:01:03 on-line
aaa 01:02:00:01 on-line
CYLL 01:28:15:41 on-line
aaa 01:05:02:24 on-line
aaa 01:04:23:59 off-line
1. operator
1.1 重载输出符<<
ostream& operator<<(ostream& out,CoreUser &core){
erroe:no match for 'operator<<' {operand types are 'std::ostreaem_iterator<CoreUser>::…… {……}' and '……'}
改正:
ostream& operator<<(ostream& out,const CoreUser &core){ }
1.2 operator 的参数个数: