[Solved] Why can’t I display this string on MessageBox? [duplicate]
You should read the compiler error messages. The second and third arguments to MessageBox have to have the same type. Either you call MessageBoxA with two char *, or you call MessageBoxW with two wchar_t *. One fix for your code would be to do MessageBoxA(NULL, buff, “User-id”, MB_OK). You are using sprintf_s incorrectly too, … Read more