摘要: TASK 3: int: char: char和int的的字节数不一样,int占一个字节数,插入占4个,改为char后,按4个数据写入,则写入了97 “ 空格” “空格 ” “ 空格” “空格 ”,然后写入98,在写入时已经不满足i<N的条件,因此写入最终结果为97 “ 空格” “空格 ” “ 空格 阅读全文
posted @ 2022-12-01 17:54 zoRing 阅读(34) 评论(0) 推荐(0)
摘要: Task4: pets.hpp #pragma ocne #include<iostream> #include<string> using namespace std; class MachinePets { string nickname; public: MachinePets(const s 阅读全文
posted @ 2022-11-25 23:05 zoRing 阅读(16) 评论(0) 推荐(0)
摘要: vectorInt.hpp #include<iostream> #include <cassert> using namespace std; class vectorInt{ public: vectorInt(int n); vectorInt(int n,int value); ~vecto 阅读全文
posted @ 2022-11-02 20:21 zoRing 阅读(37) 评论(0) 推荐(0)
摘要: info.hpp #include<iostream> #include<string> #include<vector> using namespace std; class info { private: string nickname,contact,city; int n; public: 阅读全文
posted @ 2022-10-20 18:25 zoRing 阅读(30) 评论(0) 推荐(0)
摘要: Complex.hpp #include<iostream> #include<cmath> using namespace std; class Complex{ private: double a,b; public: Complex() :a{0},b{0} { } Complex(doubl 阅读全文
posted @ 2022-10-15 13:02 zoRing 阅读(26) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> #include <vector> int main() { using namespace std; string s1; string s2{"c plus plus"}; string s3{s2}; string s 阅读全文
posted @ 2022-10-01 16:35 zoRing 阅读(14) 评论(0) 推荐(0)