2022年12月4日
摘要: 实验任务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:22 Terrence-Zhao 阅读(18) 评论(0) 推荐(0) 编辑
  2022年11月29日
摘要: 实验任务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日
摘要: 实验任务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日
摘要: 实验任务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 阅读(35) 评论(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 #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) 编辑