会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
1916wenle
博客园
首页
新随笔
联系
管理
订阅
2022年12月5日
实验6模板类和文件IO
摘要: 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, 101
阅读全文
posted @ 2022-12-05 22:50 Wen~le
阅读(36)
评论(0)
推荐(0)
2022年11月24日
实验5 多态和继承
摘要: pets.hpp 1 #pragma once 2 #include<iostream> 3 using namespace std; 4 class MachinePets { 5 public: 6 string nickname; 7 MachinePets(const string s) :
阅读全文
posted @ 2022-11-24 16:42 Wen~le
阅读(57)
评论(0)
推荐(0)
2022年11月5日
实验4
摘要: matrix.hpp 1 #pragma once 2 #include <iostream> 3 using std::cout; 4 using std::endl; 5 class Matrix { 6 public: 7 Matrix(int n); // 构造函数,构造一个n*n的矩阵 8
阅读全文
posted @ 2022-11-05 11:41 Wen~le
阅读(30)
评论(0)
推荐(0)
2022年10月24日
实验3
摘要: task5 1 #include<iostream> 2 #include<vector> 3 #include<string> 4 #include<iomanip> 5 using namespace std; 6 class Info { 7 friend void print(vector<
阅读全文
posted @ 2022-10-24 17:19 Wen~le
阅读(46)
评论(0)
推荐(0)
2022年10月13日
实验2 类和对象
摘要: task1.cpp 1 #include <iostream> 2 #include <complex> 3 int main() 4 { 5 using namespace std; 6 complex<double> c1{ 3, 4 }, c2{ 4.5 }; 7 const complex<
阅读全文
posted @ 2022-10-13 16:33 Wen~le
阅读(52)
评论(0)
推荐(0)
2022年9月30日
类和对象
摘要: 实验任务2: 1 // Point类 2 // 相较于教材,在构造函数的写法上,采用了业界更通用的初始化列表方式 3 #include <iostream> 4 using std::cout; 5 using std::endl; 6 // 定义Point类 7 class Point { 8 p
阅读全文
posted @ 2022-09-30 21:22 Wen~le
阅读(17)
评论(0)
推荐(0)
2022年9月28日
博客地址
摘要: 1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 cout<<"https://www.cnblogs.com/1916wenle/"<<endl; 6 return 0; 7 }
阅读全文
posted @ 2022-09-28 12:59 Wen~le
阅读(29)
评论(0)
推荐(0)
公告