会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
fyh2021
博客园
首页
新随笔
联系
订阅
管理
2022年12月4日
实验6 模板类和文件io
摘要: task4 Vector.cpp #pragma once using namespace std; template <typename T> class Vector{ public: Vector(int n); Vector(int n, T v); ~Vector(); Vector(co
阅读全文
posted @ 2022-12-04 15:50 费远航
阅读(18)
评论(0)
推荐(0)
2022年11月29日
实验5 继承与多态
摘要: task4 #pragma once #include<iostream> using namespace std; class MachinePets { public: MachinePets(const string s) :nickname(s){} string get_nickname(
阅读全文
posted @ 2022-11-29 19:54 费远航
阅读(15)
评论(0)
推荐(0)
2022年11月7日
实验4 类与数组、指针
摘要: task5.cpp #include <iostream> #include "vectorInt.hpp" void test() { using namespace std; int n; cin >> n; vectorInt x1(n); for (auto i = 0; i < n; ++
阅读全文
posted @ 2022-11-07 12:54 费远航
阅读(17)
评论(0)
推荐(0)
2022年10月25日
实验3
摘要: task5.cpp #include<iostream> #include<string> #include<vector> #include"info.hpp" using namespace std; int main() { const int capacity = 100; vector<i
阅读全文
posted @ 2022-10-25 17:18 费远航
阅读(18)
评论(0)
推荐(0)
2022年10月19日
实验二
摘要: task4.cpp #include "Complex.hpp" #include <iostream> void test() { using namespace std; Complex c1(3, -4); const Complex c2(4.5); Complex c3(c1); cout
阅读全文
posted @ 2022-10-19 14:32 费远航
阅读(8)
评论(0)
推荐(0)
2022年10月4日
实验1 类和对象(1)
摘要: #include <iostream> using std::cout; using std::endl; class Point { public: Point(int x0 = 0, int y0 = 0); Point(const Point&p ); ~Point() = default;
阅读全文
posted @ 2022-10-04 23:19 费远航
阅读(36)
评论(0)
推荐(0)
公告