一个欲儿的博客

一个欲儿的博客

C++ 之 std::string 转LPCSTR
2020-03-16

哎哟,转这个可把我给难死了,转这个转了一个小时,代码如下

#include<string>
#include<iostream>
using namespace std;
string str = "老子想杀了你";
LPSTR str1 = const_cast<char *>(str.c_str());


发表评论: