会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
fybbk
博客园
首页
新随笔
联系
订阅
管理
2023年12月16日
实验6 模板类、文件I/O和异常处理
摘要: 任务4 #include <iostream> #include <stdexcept> #include <stdlib.h> template <typename T> class Vector { public: friend void output(const Vector<T1> &v);
阅读全文
posted @ 2023-12-16 22:12 方艺博
阅读(27)
评论(0)
推荐(0)
2023年12月4日
实验五
摘要: 任务3 1 #include<iostream> 2 #include<stdlib.h> 3 #include<string> 4 using namespace std; 5 class MachinePets 6 { 7 private: 8 string nickname; 9 public
阅读全文
posted @ 2023-12-04 00:08 方艺博
阅读(26)
评论(0)
推荐(0)
2023年12月1日
实验四 现代c++ 标准库与类的模板
摘要: 任务5 #include <iostream> #include <string> class TextCoder { private: std::string text; void encoder() { for (char &c : text) { if (isalpha(c)) { char
阅读全文
posted @ 2023-12-01 02:51 方艺博
阅读(31)
评论(0)
推荐(0)
2023年11月6日
实验三 类与指针、数组
摘要: 实验任务1 1 #pragma once 2 3 #include <iostream> 4 using std::cout; 5 using std::endl; 6 7 class Point { 8 public: 9 Point(int x0 = 0, int y0 = 0); 10 ~Po
阅读全文
posted @ 2023-11-06 01:02 方艺博
阅读(36)
评论(0)
推荐(0)
2023年10月23日
实验2 类和对象
摘要: 实验任务3 complex.hpp 1 # include<iostream> 2 # include<cmath> 3 4 class Complex{ 5 public: 6 Complex(double r = 0, double i = 0){ 7 real = r; 8 imag = i;
阅读全文
posted @ 2023-10-23 00:44 方艺博
阅读(26)
评论(0)
推荐(0)
2023年10月20日
实验1 类和对象
摘要: 实验任务1 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <array> 5 // 函数模板 6 // 对满足特定条件的序列类型T对象,使用范围for输出 7 template<typename T>
阅读全文
posted @ 2023-10-20 00:02 方艺博
阅读(35)
评论(0)
推荐(0)
公告