this is in my timer...
it basically is a stopwatch, but I get all these errors!PHP Code:milli++;
if(milli>=10) {
milli=0;
secs++;
}
if(secs>=10) {
secs=0;
mins++;
}
char time;
char buffer[6];
strcat(time, itoa(mins, buffer, 6));
strcat(time, ":");
strcat(time, itoa(secs, buffer, 6));
strcat(time, ":");
strcat(time, itoa(milli, buffer, 6));
SendMessage(ghWnd_clock, WM_SETTEXT, 0, (LPARAM) (LPCTSTR) time);
(sorry I should have posted only 1Code:error C2664: 'strcat' : cannot convert parameter 1 from 'char' to 'char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast C:\Windows\Desktop\C c++\Win32_clock\clock.cpp(108) : error C2664: 'strcat' : cannot convert parameter 1 from 'char' to 'char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast C:\Windows\Desktop\C c++\Win32_clock\clock.cpp(109) : error C2664: 'strcat' : cannot convert parameter 1 from 'char' to 'char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast C:\Windows\Desktop\C c++\Win32_clock\clock.cpp(110) : error C2664: 'strcat' : cannot convert parameter 1 from 'char' to 'char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast C:\Windows\Desktop\C c++\Win32_clock\clock.cpp(111) : error C2664: 'strcat' : cannot convert parameter 1 from 'char' to 'char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast Error executing cl.exe.)
why doesn't this work...I did the itoa function![]()




)
Reply With Quote