会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Terrence0403
博客园
首页
新随笔
联系
订阅
管理
2022年12月4日
实验6 模板类和文件I/O
摘要: 实验任务3 1 #include <iostream> 2 #include <fstream> 3 #include <array> 4 #define N 5 5 int main() { 6 using namespace std; 7 array<int, N> x{ 97, 98, 99,
阅读全文
posted @ 2022-12-04 20:21 Terrence-Zhao
阅读(18)
评论(0)
推荐(0)
编辑
2022年11月29日
实验5 继承和多态
摘要: 实验任务4 1 #pragma once 2 #include<iostream> 3 #include<string> 4 using namespace std; 5 6 class MachinePets { 7 private: 8 string nickname; 9 public: 10
阅读全文
posted @ 2022-11-29 21:13 Terrence-Zhao
阅读(15)
评论(0)
推荐(0)
编辑
2022年11月5日
实验4 类与数组、指针
摘要: 实验任务5 1 #pragma once 2 #include<iostream> 3 4 using std::cout; 5 using std::endl; 6 7 class vectorInt { 8 public: 9 //构造函数和析构函数 10 vectorInt(int n); 1
阅读全文
posted @ 2022-11-05 20:56 Terrence-Zhao
阅读(14)
评论(0)
推荐(0)
编辑
2022年10月22日
实验3 数组、指针与现代C++标准库
摘要: 实验任务2 string类的用法 1 #include <iostream> 2 #include <string> 3 4 int main() { 5 using namespace std; 6 7 string s1, s2; 8 s1 = "nuist"; // 赋值 9 s1[0] =
阅读全文
posted @ 2022-10-22 16:55 Terrence-Zhao
阅读(36)
评论(0)
推荐(0)
编辑
2022年10月18日
实验二
摘要: 实验任务四 Complex.hpp 1 #include<iostream> 2 #include<cmath> 3 4 using std::cout; 5 using std::endl; 6 7 class Complex { 8 public: 9 //构造函数 10 Complex(flo
阅读全文
posted @ 2022-10-18 20:17 Terrence-Zhao
阅读(5)
评论(0)
推荐(0)
编辑
2022年10月5日
实验1
摘要: 1.实验任务1 1 #include<iostream> 2 #include<string> 3 #include<vector> 4 5 int main() 6 { 7 using namespace std; 8 string s1; 9 string s2{ "c plus plus" }
阅读全文
posted @ 2022-10-05 11:00 Terrence-Zhao
阅读(19)
评论(0)
推荐(0)
编辑