GetLocalTime (& amp; Sys);
MessageBox (hWnd, sys. WYear, TEXT (" warning "), MB_OK);
Type wrong, wYear is word type, how to convert
CodePudding user response:
Use the Format () into cstrings FormatCodePudding user response:
SYSTEMTIME sys.GetLocalTime (& amp; Sys);
TCHAR szMsg [256].
04 _stprintf_s (szMsg, TEXT (" % d "), the sys. WYear);
MessageBox (hWnd szMsg, TEXT (" warning "), MB_OK);