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);
}

 

posted @ 2020-06-10 09:43  strive-sun  阅读(207)  评论(0编辑  收藏  举报