会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xiao-shi
博客园
首页
新随笔
联系
订阅
管理
2022年12月6日
实验六 模板类和文件I/O
摘要: task3_1.cpp 1 #include <iostream> 2 #include <fstream> 3 #include <array> 4 #define N 5 5 6 int main() { 7 using namespace std; 8 9 array<int, N> x{ 9
阅读全文
posted @ 2022-12-06 16:55 小时不时
阅读(51)
评论(0)
推荐(0)
2022年11月26日
实验5 继承和多态
摘要: task4: pets.hpp 1 #pragma once 2 #include <iostream> 3 #include <string> 4 using namespace std; 5 6 // 定义基类,机器宠物类 MachinePets 7 class MachinePets { 8
阅读全文
posted @ 2022-11-26 20:54 小时不时
阅读(13)
评论(0)
推荐(0)
2022年11月6日
实验四 类与数组、指针
摘要: point1.hpp 1 #pragma once 2 3 #include <iostream> 4 using std::cout; 5 using std::endl; 6 7 class Point { 8 public: 9 Point():x{0},y{0} {} 10 Point(in
阅读全文
posted @ 2022-11-06 20:24 小时不时
阅读(32)
评论(0)
推荐(0)
2022年10月23日
实验三 数组、指针与现代C++标准库
摘要: task1_1.cpp 1 #include <iostream> 2 3 using std::cout; 4 using std::endl; 5 6 // 类A的定义 7 class A { 8 public: 9 A(int x0, int y0) :x{ x0 }, y{ y0 } {}
阅读全文
posted @ 2022-10-23 10:28 小时不时
阅读(6)
评论(0)
推荐(0)
2022年10月18日
类和对象(2)
摘要: 实验4: Complex.hpp文件源码 1 #pragma once 2 3 // Complex类的定义 4 #include <iostream> 5 6 using namespace std; 7 8 // Complex类的声明 9 class Complex { 10 public:
阅读全文
posted @ 2022-10-18 22:43 小时不时
阅读(70)
评论(0)
推荐(0)
2022年9月28日
实验1 类和对象
摘要: 1 // Point类 2 // 相较于教材,在构造函数的写法上,采用了业界更通用的初始化列表方式 3 4 #include <iostream> 5 6 using std::cout; 7 using std::endl; 8 9 // 定义Point类 10 class Point { 11
阅读全文
posted @ 2022-09-28 21:49 小时不时
阅读(12)
评论(0)
推荐(0)
2022年9月26日
博客主页地址汇总
摘要: https://www.cnblogs.com/xiao-shi/
阅读全文
posted @ 2022-09-26 14:02 小时不时
阅读(69)
评论(0)
推荐(0)
公告
点击右上角即可分享