win32-LPCSTR->String

#include <string>

void makebox(LPCSTR name) {
    std::string res(name);
    res += " is X";
    ::MessageBoxA(nullptr, res.c_str(), res.c_str(), MB_OK);
}
原文地址:https://www.cnblogs.com/strive-sun/p/13083119.html