会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
chenxiaolong202083290491
博客园
首页
新随笔
联系
订阅
管理
2023年12月17日
实验6-模板类、文件I/O和异常处理
摘要: Vector.hpp 1 #ifndef VECTOR_HPP 2 #define VECTOR_HPP 3 4 #include <iostream> 5 #include <stdexcept> 6 7 template<class T> 8 class Vector { 9 private:
阅读全文
posted @ 2023-12-17 12:35 神马我能行
阅读(15)
评论(0)
推荐(0)
2023年12月3日
实验五-继承和多态
摘要: pets.hpp 1 #ifndef PETS_HPP 2 #define PETS_HPP 3 4 #include <iostream> 5 #include <string> 6 7 class MachinePets { 8 protected: 9 std::string nickname
阅读全文
posted @ 2023-12-03 18:45 神马我能行
阅读(27)
评论(0)
推荐(0)
2023年11月30日
实验四-现代C++标准库与类模板
摘要: TextCoder.hpp 1 #include <string> 2 3 class TextCoder { 4 private: 5 std::string text; 6 7 void encoder() { 8 for (char& c : text) { 9 if (c >= 'a' &&
阅读全文
posted @ 2023-11-30 09:38 神马我能行
阅读(30)
评论(0)
推荐(0)
2023年11月5日
实验三-类与数组、指针
摘要: point.hpp 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
阅读全文
posted @ 2023-11-05 13:04 神马我能行
阅读(31)
评论(0)
推荐(0)
2023年10月22日
实验二-类和对象_基础编程2
摘要: task1 t.hpp 1 #pragma once 2 #include <iostream> 3 #include <string> 4 using namespace std; 5 6 class T { 7 public: 8 T(int x = 0, int y = 0); 9 T(con
阅读全文
posted @ 2023-10-22 12:09 神马我能行
阅读(39)
评论(0)
推荐(0)
2023年10月17日
实验一 类与对象_基础编程1
摘要: task1.cpp 1 #include<iostream> 2 #include<string> 3 #include<vector> 4 #include<array> 5 6 template<typename T> 7 void output1(const T &obj){ 8 for(au
阅读全文
posted @ 2023-10-17 16:01 神马我能行
阅读(30)
评论(0)
推荐(0)
公告