• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ooshxxx
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2019年6月17日

实验6 流类库与I/O
摘要: Part 1 // 合并两个文件内容到一个新文件中。 // 文件名均从键盘输入 #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; int main() { 阅读全文
posted @ 2019-06-17 18:30 ooshxxx 阅读(139) 评论(1) 推荐(0)
 
 

2019年6月1日

实验5
摘要: #include #include using namespace std; //抽象类 MachinePets class MachinePets{ public: MachinePets(); MachinePets(const string s){ nickname=s; } ... 阅读全文
posted @ 2019-06-01 13:22 ooshxxx 阅读(159) 评论(0) 推荐(0)
 
 

2019年5月19日

实验4 类的继承、派生和多态
摘要: 1. 车辆基本信息管理 #include"car.h" #include<string> #include<iostream> using namespace std; ostream& operator<<(ostream &out, const Car &c) { out << "maker:" 阅读全文
posted @ 2019-05-19 23:05 ooshxxx 阅读(186) 评论(3) 推荐(0)
 
 

2019年4月21日

C++ 实验3 类和对象
摘要: Part 2 #ifndef GRAPH_H #define GRAPH_H class Graph { public: Graph(char ch, int n); void draw(); private: char symbol; int size; }; #endif #include "g 阅读全文
posted @ 2019-04-21 23:11 ooshxxx 阅读(258) 评论(0) 推荐(0)
 
 

2019年4月3日

Complex类
摘要: #include <iostream> #include <cmath> using namespace std; class Complex{ public: Complex(double a=0,double b=0); Complex(Complex &c); void add(Complex 阅读全文
posted @ 2019-04-03 14:48 ooshxxx 阅读(173) 评论(0) 推荐(0)
 
 

2019年3月24日

c++ 实验2
摘要: 1.函数重载编程练习 编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型数据,调用测试。 2.函数模板编程练习 编写实现快速排序函数模板,并在main()函数中,定义不同类型数据,调用测试 3.类的定义、实现和使用编程练习 设计并实现 阅读全文
posted @ 2019-03-24 20:35 ooshxxx 阅读(188) 评论(0) 推荐(0)
 
 

2019年3月16日

c++ 实验1
摘要: 2-28 实现一个简单的菜单程序,运行时显示“Menu:A(dd) D(elete) S(ort) Q(uit),Select one:” 提示用户输入。 A表示增加,D表示删除,S表示排序,Q表示退出。输入为A、D、S时分别提示“数据已经增加、删除、排序。”,输入为Q时程序结束。 [1] if-e 阅读全文
posted @ 2019-03-16 21:54 ooshxxx 阅读(206) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3