WELCOME

任何一个伟大的目标,都有一个微不足道的开始。
摘要: task3_1.cpp #include <iostream> #include <fstream> #include <array> #define N 5 int main() { using namespace std; array<int, N> x {97, 98, 99, 100, 10 阅读全文
posted @ 2022-12-02 14:28 周杰棍的双截伦 阅读(23) 评论(0) 推荐(0) 编辑
摘要: task 4 '''pets.hpp''' #pragma once using namespace std; #include <iostream> class MachinePets { friend void play(MachinePets &obj); public: MachinePet 阅读全文
posted @ 2022-11-28 13:18 周杰棍的双截伦 阅读(6) 评论(0) 推荐(0) 编辑
摘要: task 5 vectorInt.hpp #pragma once #include <iostream> using namespace std; class vectorInt { public: vectorInt (int n) { cout << "constructor 2 called 阅读全文
posted @ 2022-11-07 23:48 周杰棍的双截伦 阅读(16) 评论(0) 推荐(0) 编辑
摘要: ## 实验五 ### info.hpp #pragma once #include <iostream> using namespace std; class Info{ public: Info(string name,string cont,string city,int n){ this->n 阅读全文
posted @ 2022-10-25 19:42 周杰棍的双截伦 阅读(15) 评论(0) 推荐(0) 编辑
摘要: task 4 Complex.hpp #pragma once #include <iostream> #include <cmath> using namespace std; class Complex { friend Complex add(const Complex &c1, const 阅读全文
posted @ 2022-10-13 23:18 周杰棍的双截伦 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 任务二 // Point类 // 相较于教材,在构造函数的写法上,采用了业界更通用的初始化列表方式 #include <iostream> using std::cout; using std::endl; // 定义Point类 class Point { public: Point(int x0 阅读全文
posted @ 2022-09-28 18:21 周杰棍的双截伦 阅读(42) 评论(0) 推荐(0) 编辑
摘要: task 1 1.2004 2.2001 3.指针指向类型不同,前者指向int型,++p加 sizeof(int)=4 task 2 1.2004 2004 2.2001 2001 task 3 1.sizeof 计算实际分配的内存数,包含'\0' strlen计算字符个数不包含\0 2.不可以 3 阅读全文
posted @ 2022-06-07 13:38 周杰棍的双截伦 阅读(51) 评论(0) 推荐(0) 编辑
摘要: task 1 // 将图书信息写入文本文件data1.txt #include <stdio.h> #define N 5 #define M 80 typedef struct { char name[M]; // 书名 char author[M]; // 作者 } Book; int main 阅读全文
posted @ 2022-05-31 15:20 周杰棍的双截伦 阅读(40) 评论(1) 推荐(0) 编辑
摘要: task 1 #include <stdio.h> #define N 4 int main() { int a[N] = {2, 0, 2, 2}; char b[N] = {'2', '0', '2', '2'}; int i; printf("sizeof(int)=%d\n", sizeof 阅读全文
posted @ 2022-05-05 15:43 周杰棍的双截伦 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 11111111111 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void printText(int line, int col, char text[]); 阅读全文
posted @ 2022-04-21 21:52 周杰棍的双截伦 阅读(40) 评论(0) 推荐(0) 编辑