会员
周边
新闻
博问
闪存
众包
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xiaozhengcaicai
博客园
首页
新随笔
联系
订阅
管理
2022年12月1日
实验6-模板类和文件
摘要: task3: task3.1.cpp 1 #include<iostream> 2 #include<fstream> 3 #include<array> 4 #define N 5 5 int main() 6 { 7 using namespace std; 8 array<int ,5> x{
阅读全文
posted @ 2022-12-01 17:10 小郑菜菜
阅读(57)
评论(0)
推荐(0)
2022年11月26日
实验5-类的继承
摘要: 1. pets.hpp. 1 #pragma once 2 #include<iostream> 3 #include<string> 4 5 using namespace std; 6 7 class MachinePets{ 8 public: 9 MachinePets(const stri
阅读全文
posted @ 2022-11-26 16:05 小郑菜菜
阅读(95)
评论(0)
推荐(0)
2022年11月4日
实验四———类与数组指针
摘要: 1.实验内容 1 2 #pragma once 3 #include<iostream> 4 using namespace std; 5 class vectorInt { 6 7 public: 8 vectorInt(int n0); 9 vectorInt(int n0,int value1
阅读全文
posted @ 2022-11-04 19:51 小郑菜菜
阅读(43)
评论(0)
推荐(0)
2022年10月20日
第三次实验
摘要: task5: #include<iostream> #include<vector> #include<string> #include"5.1.h" using namespace std; int main() { cout<<"录入信息:"<<endl; cout<<" 昵称"<<" "<<"
阅读全文
posted @ 2022-10-20 18:31 小郑菜菜
阅读(42)
评论(0)
推荐(0)
2022年10月16日
实验二——类与对象(2)
摘要: task2:array<int,5> x3<x1>;语句在devc的环境下可能会报错,改成array<int,5> x3(x1)可正确编译。 task3:to_string的功能是将数字常量转换为字符串,还有就是要注意,静态变量类外初始化,并且要注意初始化时没有static。 task4: #pra
阅读全文
posted @ 2022-10-16 09:44 小郑菜菜
阅读(32)
评论(0)
推荐(0)
2022年10月3日
实验1类和对象(1)
摘要: 1. 实验任务1 1.template指的是模板。比如,我们要写一个swap函数来交换两个元素。但这两个元素可能是int也可能使char,如果不用模板的话,我们可能要写多个函数才能完成。但是用模板的话。就可以很轻松的相当与用一个函数完成多项任务、 2.类似v1.begin返回的值是指针类型,因此输出
阅读全文
posted @ 2022-10-03 20:32 小郑菜菜
阅读(32)
评论(0)
推荐(0)
2022年9月29日
个人博客地址
摘要: https://www.cnblogs.com/xiaozhengcaicai/
阅读全文
posted @ 2022-09-29 22:27 小郑菜菜
阅读(47)
评论(0)
推荐(0)
公告