I got error when I compile the following code, the error tells me that I have to convert unsigned short to char, i dont know how to perform this conversion. I’m using vc6 MFC. This is the code I used.
SYSTEMTIME st;
GetSystemTime(&st);
unsigned short time = st.wHour;
MessageBoxA(TEXT(time),"system time",MB_OK);
You could use a
std::ostringstream: