如果引用了stdio.h
#include <stdio.h>
必须使用std::remove()。
否则会冲突
#include <algorithm>
#include <string>
string s="abc\"def\"";
s.erase(std::remove( s.begin(), s.end(), '\"' ),s.end());
remove double quotes from a string in c++ - Stack Overflow
2025-03-03 09:47:03 阅读次数:1
如果引用了stdio.h
#include <stdio.h>
必须使用std::remove()。
否则会冲突
#include <algorithm>
#include <string>
string s="abc\"def\"";
s.erase(std::remove( s.begin(), s.end(), '\"' ),s.end());
remove double quotes from a string in c++ - Stack Overflow
LeetCode2866C++算法:美丽塔O(n)解法单调栈
【智能指针】std::unique_ptr 和weak_ptr 基本用法
C++二分查找算法的应用:LeetCode483最小好进制
C++实现的支持插入顺序的高效map
简单C#类转非托管C++
【状态压缩】【动态规划】【C++算法】691贴纸拼词
【C++】linux多线程设置线程名字
【C++ 乘法原理 差分数组】2963:统计好分割方案的数目|1984
C++二分查找算法的应用:300最长递增子序列
C++算法:282给表达式添加运算符
文章
30394
阅读量
4289209
2025-02-28 09:28:12
2025-02-27 09:33:52
2025-02-27 09:33:30
2025-02-27 09:33:20
2025-02-18 07:29:49
2025-02-18 07:27:24
2023-08-07 08:28:55
2024-04-17 08:25:53
2024-12-19 08:47:09
2024-10-25 07:15:44
2024-12-11 06:42:09
2024-12-10 07:14:31