跪求大神!

征服全世界Orz 2012-02-02 08:00:46
Goal:
- use of static/dynamic binding
- using STL collections
- operator overloading
- optimize your code

Task:
Make the necessary changes to be able to populate a STL vector with both Vehicles and Solarcars. Overload the << operator for Vehicle. When you call info() or use << you should see the right information appearing.

Use all your current knowledge on C++ to optimize your code. Think about calling methods, return types, need to define constructor, destructor, copy-constructor, assignment operator...

求大神翻译一下
...全文
68 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
sagegz 2012-02-02
  • 打赏
  • 举报
回复

目标:
-使用静态绑定或动态绑定
-使用标准模板库集合类
-操作符重载
-最优化你的代码

任务:
对Vehicles和Solarcars做出必要的变化以此来使用标准模板库中的矢量(向量)。
对Vehicles类重载操作符<<.当你调用info()或者使用<<你将会看到正确的信息。
使用你现知道的所有C++知识最优化你的代码。考虑调用方法,返回类型,必要的构造函数、析构函数、拷贝构造函数、赋值操作符...
quwei197874 2012-02-02
  • 打赏
  • 举报
回复
用翻译助手什么的

64,647

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧