std::string GetStr()
{
return "testtest";
}
void OnBnClickedOk()
{
const char *pStr = GetStr().c_str();
printf("%s", pStr); //pStr指向的區域已經被釋放
}
std::string GetStr()
{
return "testtest";
}
void OnBnClickedOk()
{
const char *pStr = GetStr().c_str();
printf("%s", pStr); //pStr指向的區域已經被釋放
}