摘要:
头文件:#include <vector> 特点:连续内存,尾部操作 O(1),中间插入/删除 O(N)。 1. 初始化 (生) vector<int> v; // 1. 空数组 vector<int> v(10); // 2. 1个 vector,大小为10,值全为0 vector<int> v( 阅读全文
posted @ 2025-12-04 20:00
Sunstreamy
阅读(2)
评论(0)
推荐(0)
摘要:
1. 必杀技:字符串切割 (Split) 强绑定用法:这是最常用的场景,配合使用实现 Split。 string str = "2023-10-01"; stringstream ss(str); string segment; // 重点:getline 第三个参数是分隔符 //从ss中按'-'读 阅读全文
posted @ 2025-12-04 19:23
Sunstreamy
阅读(4)
评论(0)
推荐(0)
浙公网安备 33010602011771号