SteveCRM
Apr 30th, 2001, 06:17 PM
this is in my timer...
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);
it basically is a stopwatch, but I get all these errors!
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.
(sorry I should have posted only 1 :p )
why doesn't this work...I did the itoa function :confused:
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);
it basically is a stopwatch, but I get all these errors!
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.
(sorry I should have posted only 1 :p )
why doesn't this work...I did the itoa function :confused: