腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
如何使用
std
::codecvt_utf8_utf16在没有任何
字符串
类的情况下与utf8进行转换?
、
、
、
、
如何使用
std
::codecvt_utf8_utf16
将
uft8
转
换为
utf16并返回,而无需使用任何
字符串
类(如
std
::string或
std
::wstring ),而只使用普通数组和文字
字符串
?例如,为了满足这个接口:
std
:
浏览 0
提问于2017-02-25
得票数 3
回答已采纳
6
回答
从c++中的
字符串
中删除双引号
、
、
我从
字符串
中去掉双引号,但是我一直从下面的函数中得到这个错误。这里有什么问题?void readCSVCell(stringstream& lineStream, string& s) { s.erase(remove( s.begin(), s.end(), '\"' ), s.end());错误 c.cpp:在函数void readCSVCell(
std
::stringstream&a
浏览 8
提问于2011-04-15
得票数 4
3
回答
将
char
*整数数组转
换为
十六进制
我有一个结构,它将整数值存储为自定义
字符串
类型。因此,我有一些实例,希望
将
包含"12"的
字符串
转
换为
C。
浏览 5
提问于2012-10-22
得票数 2
回答已采纳
2
回答
C++
char
*作为函数参数
如何
将
char
指针(
char
*)传递给函数func()using namespace
std
; {} { func(test);编译器说: 初始化:无法
将
const
char</em
浏览 8
提问于2022-02-21
得票数 0
回答已采纳
2
回答
const
char
的
std
::to_string商店*
、
我需要将数字转
换为
字符串
并将其存储到
const
char
*中,但问题是赋值后
const
char
*变量是空的。在下面的示例代码中,我希望看到数字输出转
换为
const
char
*#include <string> {
const
char
* ptr_num_str
浏览 0
提问于2019-03-28
得票数 3
回答已采纳
1
回答
将
const
std
::vector<
std
::string>转
换为
const
char
**
、
、
我有这样一个有签名的功能:{} 我希望
将
向量args转
换为
const
char
** (我们实际上不能创建一个
char
**数组,因为它(显然)无法
将
const
char
*类型的args[i].c_str()转
换为
char
*。我
浏览 3
提问于2013-06-10
得票数 2
回答已采纳
1
回答
将
字符串
转
换为
常量
char
* (带二进制数据)
、
我想要做的是
将
一个
字符串
转换成
const
char
*。理想情况下,我可以只使用"
const
char
* myConstChar = myString.c_str()“,但正如我下面的例子所示;它不适合二进制数据:#<< "\n";
std
::cout <<
浏览 0
提问于2012-06-18
得票数 0
回答已采纳
2
回答
如何
将
const
char
&转
换为
const
std
::string&?
std
::stof()需要: float
std
::stof(
const
std
::wstring &,size_t *) float
std
::stof(
const
std
::string &,size_t*) 此函数用于将由空格分隔的
字符串
转
换为
包含浮点数的向量。我尝试使用
std
::stof()函数
将
字符转
换为
浮点数。我找不到
将
cons
浏览 50
提问于2021-06-24
得票数 0
回答已采纳
4
回答
将
std
::vector<
std
::string>转
换为
const
char
*
const
*
、
、
但是来自的字段ppEnabledLayerNames只接受
const
char
*
const
*。我不了解它的类型,也不知道如何将我的向量数据转换成它。
std
::vector<
std
::string> v = {};
const
char
*
const
* data=
std
::accumulate(
std</e
浏览 1
提问于2017-07-09
得票数 0
1
回答
如何
将
utf字符转
换为
windows-1252?
、
、
、
我有一个带有货币符号的
字符串
:我已经把它转换成未签名的字符:{
std
::cout<<
浏览 0
提问于2019-03-28
得票数 1
2
回答
c++ FindFirstFile无法
将
const
char
转
换为
basic_string
我得到一个编译器错误#include <string>#include <stdio.h> int _tmain(int argc
浏览 4
提问于2015-09-04
得票数 0
回答已采纳
2
回答
从
std
::string创建OssBitString?
、
、
、
OssBitString接受
字符串
长度(以位为单位)和常量无符号字符*作为参数。但是,当我
将
输入
std
::string转
换为
const
unsigned
char
*并将其传递给OssBitString时,
字符串
的内容被修改并包含奇怪的字符。下面是
std
::string到OssBitString的转换函数: inline
const
OssBitString converter(
const
std
::
浏览 15
提问于2020-01-15
得票数 0
2
回答
在C++中,
将
字符指针存储到
字符串
中最有效的方法是什么
、
在C++中,
将
字符指针存储到
字符串
中最有效的方法是什么?
浏览 2
提问于2012-02-24
得票数 0
回答已采纳
1
回答
整理::转换导致分割错误
、
、
当我运行以下源代码时,在line#3上得到了“分段错误(核心
转
储)”
const
std
::collate<
char
>* pc = &
std
::use_facet<
std
::collate<
char
> >(
std
::locale("en_US"));
std
::string str =
浏览 7
提问于2014-02-17
得票数 1
回答已采纳
5
回答
将
std
::string替
换为
const
char
*
我想知道有没有人能帮我实现这个方法,而我不需要使用
std
::string。Matche(
const
char
*str, size_t strSize)
std
:
浏览 0
提问于2012-02-28
得票数 0
回答已采纳
5
回答
将
const
char
*转
换为
std
::string
、
、
我已经从一个处理函数返回了一个
const
char
*,我希望将它转换/分配给
std
::string的一个实例,以便进行进一步的操作。这看起来应该是直截了当的,但我还没有找到任何文件来说明应该如何做。
浏览 5
提问于2014-06-09
得票数 30
回答已采纳
3
回答
将
const
std
::vector<
char
>转
换为
unsigned
char
*?
、
、
在库中有一个函数,它接受缓冲区作为unsigned
char
*。由于使用C++,我
将
实际的缓冲区存储在
std
::vector<
char
>中,此外,我还在包装器类中添加了
const
,因为有问题的缓冲区是一个输入缓冲区,它不会被修改。但是我的代码不能编译,demo:#include <vector> { printf("%s\n",s)
浏览 115
提问于2017-03-14
得票数 3
回答已采纳
1
回答
多个ints到
const
char
*
、
、
、
、
我试着用多个ints做
字符串
。让我们说:int month = 12;
const
char
* date = ("%d-%d-%d", month, day, year);error: invalid conversion from 'int' to '
const
char
*' [-fpermissive] 做这件事最好的方法是什么?
浏览 1
提问于2014-10-18
得票数 0
回答已采纳
3
回答
为什么从int到
const
char
*破坏了C++?
、
嗨,最近我在Visual学习C++,当我想用我的方法记录一个int时,我停止了一个问题,我需要将它转
换为
const
*但是当我这样做的时候,我的代码是崩溃:#includeint level = 1; { } void Warning(
const
浏览 4
提问于2021-02-13
得票数 0
回答已采纳
3
回答
连接
std
::string和int
将
导致转移。为什么?
、
、
、
今天,当我试图
将
一个
std
::string和一个int连接起来时,我感到很惊讶。考虑以下MWE:#include <string> {用数
浏览 1
提问于2020-05-06
得票数 1
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
腾讯会议
云直播
对象存储
活动推荐
运营活动
广告
关闭
领券