社区
C++ Builder
帖子详情
C++ builder中怎么将void * 转化为String
techshinocom
2012-11-14 09:35:41
int Feature(int nRet, void *hFea);
void * hFea=malloc(512);
int nRet=0;
Feature(nRet,hFea);
要将hFea取出并转为String,怎么处理。
...全文
278
1
打赏
收藏
C++ builder中怎么将void * 转化为String
int Feature(int nRet, void *hFea); void * hFea=malloc(512); int nRet=0; Feature(nRet,hFea); 要将hFea取出并转为String,怎么处理。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
ccrun.com
2012-11-14
打赏
举报
回复
String str = (String)(char *)hFea;
C++
void
*与
string
互转
`#include <utility> // std::pair #include <... // Cast a dynamically allocated
string
to '
void
*'.
void
*vp = static_cast<
void
*>(new std::
string
("it's easy to break stuff
C++
Builder
String
转 char* (转)
使用
C++
Builder
处理字符串经常会遇到兼容性问题。 这次要将
String
类型 转成 char* 查了很多方法,最终如此解决:
void
LoadFile(
String
aFile) { Ansi
String
My
String
= aFile; //声...
C++
Builder
string
相互转换
1. char*->
string
(1)直接转换 const char* nodename;
string
temp = nodename;
string
temp2(nodename); 2. wchar_t*->w
string
(1)直接转换 const wchar_t* nodename; w
string
temp = nodename; w
string
temp...
C++
Builder
常用
String
关于AnsiSting的使用大全(1) arrow: Ansi
string
转 char ...
void
__fastcall TForm1::Button1Click(TObject *Sender) { Ansi
String
Test = "哈哈"; char *chr = Test.c_str(); } char转Ansist...
C++
builder
之 字符串转换
//Ansi
string
转char
void
__fastcall TForm1::Button1Click(TObject *Sender) { Ansi
String
Test = "哈哈"; char *chr = Test.c_str(); } //char转Ansi
string
#include
void
__fastcall TForm1
C++ Builder
13,825
社区成员
102,679
社区内容
发帖
与我相关
我的任务
C++ Builder
C++ Builder相关内容讨论区
复制链接
扫一扫
分享
社区描述
C++ Builder相关内容讨论区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章