9.8C++作业 - 实践

news/2025/9/22 12:28:55/文章来源:https://www.cnblogs.com/lxjshuju/p/19104923

思维导图

#include
#include
#include
using namespace std;
class Stu
{
friend ofstream &operator s1;
s1.push_back(Stu("yy","1001",19,97));
vector s2;
s2.push_back(Stu("dd","1002",19,94));
vector s3;
s3.push_back(Stu("hh","1003",20,96));
ofstream ofs;
ofs.open("D:\\Qt\\qt-project\\hq\\day8\\test6\\stu_txt",ios::out);
for(const auto &stu : s1)
{
ofs > buf)
{
cout << buf << endl;
}
ifs.close();
return 0;
}
#include
#include
using namespace std;
void list_printf(list &l)
{
list::iterator iter;
for(iter = l.begin(); iter != l.end(); iter++)
{
cout  l1;
l1.push_back(10);
l1.push_back(20);
l1.push_back(30);
l1.push_back(40);
l1.push_back(50);
cout  l2 = l1;
cout  l3(l1.begin(),l1.end());
cout  l4(6,6);
cout  l5;
l5.assign(l1.begin(),l1.end());
cout  l6 = l4;
cout << "l6:";
list_printf(l6);
l6.remove(20);
list_printf(l6);
l6.clear();
list_printf(l6);
return 0;
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/909319.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

(一)React面试(虚拟DOM/类组件) - 详解

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

浏览器访问页面卡顿刷新页面方法

浏览器访问页面卡顿刷新页面方法浏览器访问页面卡顿刷新页面方法 同一个网址在一个浏览器中开了多个tab页窗口,会出现卡顿等转圈圈的现象 扩展浏览器缓存空间通过修改启动参数增加缓存容量: "C:\Program Files …

完整教程:散斑深度相机原理

完整教程:散斑深度相机原理pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco",…

k8s Understanding Kubernetes Security Components

Understanding Kubernetes Security Components In Kubernetes, security is implemented through several components that work together to control access and permissions. Lets explore ServiceAccounts, Roles,…

如何用 Dify 无代码工作流实现 AI 自动化抓取与分析 LinkedIn 招聘数据

如何用 Dify 无代码工作流实现 AI 自动化抓取与分析 LinkedIn 招聘数据在本指南中,您将学习到以下内容:Dify 是什么? 为什么要将它与一体化搜索插件整合? 将 Dify 与 Bright Data 插件集成的优势 创建 Dify 搜索工…

2025/9/22

2025/9/22学习统一建模语言 学习数据结构,链表

WSL+共享文件夹搭建zephyr工作环境

之前使用window是编译,但是发现编译真的太慢了,所以还是尝试安装ubuntu来开发: 我这里有一个搭建好的,可以直接wsl安装,但是不支持完整的SDK工具,只支持esp32和arm sdk版本是 0.17.4,只安装了(arm,esp32, es…

如果 Spring Cloud Feign 配置了 OkHttp3 非阻塞 IO(NIO),那么还需要reactor 模型来提高性能吗

目录先明确核心区别:OkHttp3与Reactor模型的定位为什么可能还需要Reactor模型?何时需要引入Reactor?何时可以不引入Reactor?总结 如果 Spring Cloud Feign 配置了 OkHttp3 非阻塞 IO(NIO),那么还需要reactor 模…

数据结构-单链表基础2

0.基本结构和函数 前置内容,可以访问数据结构-单链表基础1点击查看代码 typedef int ElemType; typedef struct LNode {ElemType data;struct LNode *next; } LNode, *linkList; void CreateList_R(linkList *L, int …

LLM的MCP协议通讯方式详解:Stdio、SSE与流式HTTP的选择与实践 - 详解

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

Trellix自动化大规模修复开源漏洞,已修补超6万个项目

Trellix通过自动化工具加速修复Python的tarfile模块中存在15年的路径遍历漏洞(CVE-2007-4559),已成功修补61,895个开源项目,并与GitHub合作实现大规模批量拉取请求的自动化修复流程。Trellix自动化大规模修复开源漏…

AI 编程工具选型速览(2025-09 版) - 详解

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

爆款游戏背后:尚娱如何借助阿里云 Kafka Serverless 轻松驾驭“潮汐流量”?

阿里云 Kafka 不仅为尚娱提供了高可靠、低延迟的消息通道,更通过 Serverless 弹性架构实现了资源利用率和成本效益的双重优化,助力尚娱在快速迭代的游戏市场中实现敏捷运营、稳定交付与可持续增长。作者:横槊、永安…

Vben Admin5.0 keepAlive缓存和onActivated未生效

根据文档 https://doc.vben.pro/guide/essentials/route.html#keepalive 需要打开页面缓存,缓存才会生效 在配置文件preferences.ts下开启export const overridesPreferences = defineOverridesPreferences({// overr…

yakit + proxifier 解决`all tls strategy failed报错

yakit + proxifier 解决`all tls strategy failed报错场景 在 proxifier + yakit 时,某一个 https 的 url总会遇到`all tls strategy failed 失败的情况,其余的 url,甚至换成 burp 都 ok,百思不得其解。 解决思路 …

版本速递 | 华为云Versatile智能体平台 新增特性介绍(2025年9月发布)

本文分享自华为云社区《版本速递 | 华为云Versatile智能体平台 新增特性介绍(2025年9月发布)》,作者:Versatile运营小助手。< 华为云Versatile智能体平台 体验入口 >(请在PC端打开) 版本概览 Versatile 92…

详细介绍:传输层TCP 与 安全层SSL/TLS

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

PE程序常见脱壳方案

PE程序常见脱壳方案 基础知识 PE文件格式 PE(Portable Executable)是Windows平台下的可执行文件格式。理解PE结构是成功脱壳的前提,加壳程序的核心策略就是通过篡改、加密或隐藏原始PE头信息来保护代码,这意味着脱…

spring ai基于内存RAG尝鲜

RAG,数据检索增强生成,简单点说你提供一个数据集,让语言模型根据你的数据集回答问题。 1.新增依赖 这次的练习demo是将一个pdf作为数据集,喂给模型做训练生成内存向量库,以此回答问题。下面新增的依赖是pdf阅读和…

基于 IOCP 的协程调度器——零基础深入浅出 C++20 协程

将真实的异步 IO 事件与协程相结合、例子规模控制在 200 行、能编译能运行的 Windows C++20 协程 demo,见过没?今天就给各位老铁整一个,它还支持多协程并发哦~前言 上一篇《基于 epoll 的协程调度器》谈到如何基于 …