当前位置: 首页 > news >正文

网站域名续费后SEO查询未更换科技小巨人申报条件

网站域名续费后SEO查询未更换,科技小巨人申报条件,网络营销做得好的企业有哪些,新浪sae可以做网站么一、思维导图二、封装一个学生的类,定义一个学生这样类的vector容器, 里面存放学生对象(至少3个)再把该容器中的对象,保存到文件中。再把这些学生从文件中读取出来,放入另一个容器中并且遍历输出该容器里的学生。#incl…

一、思维导图

二、封装一个学生的类,定义一个学生这样类的vector容器, 里面存放学生对象(至少3个)

再把该容器中的对象,保存到文件中。

再把这些学生从文件中读取出来,放入另一个容器中并且遍历输出该容器里的学生。

#include <iostream>
#include <vector>
#include<fstream>using namespace std;class Stu
{friend ostream& operator<<(ostream& os, const Stu& student);friend istream& operator>>(istream& is, Stu& student);string name;int age;public :Stu(){}Stu(string name,int age) : name(name),age(age){}string getName() const{return name;}int getAge() const{return age;}};ostream& operator<<(ostream& os, const Stu& student) {os << student.name << " " << student.age;return os;}
istream& operator>>(istream& is, Stu& student) {is >> student.name >> student.age;return is;}int main()
{Stu s1("zzh",22);Stu s2("lrh",22);Stu s3("zry",22);vector<Stu> s;s.push_back(s1);s.push_back(s2);s.push_back(s3);ofstream ofs;ofs.open("D:/QT/documents/day8/Stu.txt",ios::out);for (const auto& student : s){ofs << student << endl;}ofs.close();vector<Stu> students;ifstream ifs;ifs.open("D:/QT/documents/day8/Stu.txt",ios::in);Stu temp;while (ifs >> temp) {students.push_back(temp);}ifs.close();cout << "从文件中读取的学生信息:" << endl;for (const auto& student : students) {cout << "姓名: " << student.getName()<< ", 年龄: " << student.getAge() << endl;}return 0;
}

http://www.dtcms.com/a/500368.html

相关文章:

  • python super【python】
  • python迭代器解包【python】
  • 企业网站建设渠道外贸网站建设报价表
  • 在 VS Code 里看清你的数据流向:Gudu SQL Omni 实测体验
  • 前缀和|并查集
  • 如何开网站详细步骤图wordpress高并发
  • 视频网站开发要多少钱手机版的网站怎样做呢
  • 做网站的工作好做吗济南品牌网站建设
  • 最简单的网站开发工具全国建筑信息服务平台
  • 免费cms建站五指哪里有永久免费建站
  • S1-算法效率分析
  • TDengine 数据函数 LN 用户手册
  • 做问卷有哪些网站做360全景有什么网站
  • 东莞网站推广营销网站生成
  • 网站管理助手数据库企业邮箱网页版
  • 算法代码速成8:非线性最小二乘问题编程示例:人口预测
  • 网站建设的目标和需求分析比较好的公关公司
  • 视频播放网站怎么做三亚市住房和城乡建设厅网站
  • 用HarmonyOS中ArkTS的视角来学Dart语法(一)
  • 哪个网站做外贸年费比较便宜wdcp网站无法访问
  • 免费网站建设公司推荐最简单的网站模板下载
  • ConcurrentHashMap 1.7 vs 1.8 源码对决:分段锁 → CAS + synchronized
  • 应急响应—特洛伊挖矿木马事件排查
  • 建个购物网站要多少钱个人网页简历设计
  • 18-自编码器:探讨用于特征学习和数据压缩的神经网络模型
  • 网站结构 seo腾讯短网址在线生成
  • wapi与wifi对比优势总结
  • 上传网站到googleui设计网站建设是什么意思
  • const 与 constexpr
  • 网站的推广运营模板图片可爱