#include <string> void makebox(LPCSTR name) { std::string res(name); res += " is X"; ::MessageBoxA(nullptr, res.c_str(), res.c_str(), MB_OK); }