Why the rand ()% 100 function returns numbers greater than 100. I did not observe this before, at least in console versions. Here I tried to display a hidden number in the MessageBox.
srand(time(0)); int c_train=rand()%100; wchar_t buffer[30]; char buffer_c[20]; string value; string title="Значение: "; title=title+itoa(c_train,buffer_c,8); MultiByteToWideChar(CP_ACP,0,title.c_str(),-1,buffer,30); MessageBox(NULL, buffer, _T("Win32 Guided Tour"), NULL);