会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
景行ai
博客园
首页
新随笔
联系
订阅
管理
2019年6月18日
C++实验六
摘要: Part2 #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; int main() { string filename1, filename2, newfi
阅读全文
posted @ 2019-06-18 12:03 景行ai
阅读(151)
评论(0)
推荐(0)
2019年6月3日
C++实验五
摘要: #include <iostream> #include <string> using namespace std; class MachinePets{ public: MachinePets(const string s):nickname(s){}; string getNickname();
阅读全文
posted @ 2019-06-03 22:30 景行ai
阅读(116)
评论(2)
推荐(0)
2019年5月20日
C++实验四
摘要: #ifndef BATTERY_H #define BATTERY_H class Battery { public: Battery(int batterySize0=70); int showbattery()const; int batterySize; }; #endif #include"
阅读全文
posted @ 2019-05-20 17:58 景行ai
阅读(175)
评论(1)
推荐(0)
2019年4月22日
C++实验三
摘要: Part2 #ifndef GRAPH_H #define GRAPH_H // 类Graph的声明 class Graph { public: Graph(char ch, int n); // 带有参数的构造函数 void draw(); // 绘制图形 private: char symbol
阅读全文
posted @ 2019-04-22 23:13 景行ai
阅读(145)
评论(0)
推荐(0)
2019年4月1日
课堂小练习: 设计、定义并实现Complex类
摘要: #include<iostream> #include<cmath> using namespace std; class Complex{ public: Complex(double x,double y); Complex(Complex &a); void add(Complex a); v
阅读全文
posted @ 2019-04-01 21:43 景行ai
阅读(118)
评论(1)
推荐(0)
2019年3月26日
C++实验二
摘要: 一、函数重载编程练习 编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型数据,调用测试。 #include<iostream> using namespace std; struct complex{ double real; dou
阅读全文
posted @ 2019-03-26 13:11 景行ai
阅读(212)
评论(2)
推荐(0)
2019年3月18日
C++实验一
摘要: 实验结论2-28 第一种方法使用while #include<iostream> using namespace std; int main(){ char i; cout<<"Menu:A(dd) D(elete) S(ort) Q(uit),Select one:"<<endl; while(1
阅读全文
posted @ 2019-03-18 22:10 景行ai
阅读(226)
评论(2)
推荐(0)
公告