鱼C论坛

 找回密码
 立即注册
查看: 484|回复: 1

c++

[复制链接]
发表于 2023-12-26 11:14:41 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
下列代码打头文件均已经写好,但是依旧有错误        :没有与这些操作数匹配的 "<<" 运算符        车票管理系统       

#include<iostream>
#include<ctime>
#include"TrainManager.h"
using namespace std;

TrainManager::TrainManager() {

        this->m_num = this->m_tArray[0]->index;//总班次
}

void TrainManager::showTrains() {
                for (int i = 0; i < m_num; i++) {
                        cout << ":" <<
                                m_tArray[i]->m_index << endl;
                        cout << "起点站:" <<
                                m_tArray[i]->m_depPlace << endl;
                        cout << "终点站" <<
                                m_tArray[i]->m_endPlace << endl;
                        cout << "发车时间:" <<
                                m_tArray[i]->m_depTime<<endl;
                        cout << "额定载量:" <<
                                m_tArray[i]->m_loadCap << endl;
                                cout << "已定票人数:" <<
                                        m_tArray[i]->m_orderNum << endl;
                }

}
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2023-12-26 11:14:47 | 显示全部楼层
问题的描述不够清晰,无法准确判断错误的原因。请提供更多的代码以及错误的具体信息,这样才能帮你找到解决方案。

以上回复来自 FishC AI 小助理,如未能正确解答您的问题,请继续追问。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-20 16:07

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表