Click here to Skip to main content
15,890,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Kernel32.dll Pin
Prakash Nadar17-Nov-03 0:29
Prakash Nadar17-Nov-03 0:29 
GeneralRe: Kernel32.dll Pin
Mike Dimmick17-Nov-03 0:33
Mike Dimmick17-Nov-03 0:33 
GeneralRe: Kernel32.dll Pin
hph17-Nov-03 1:50
hph17-Nov-03 1:50 
GeneralRe: Kernel32.dll Pin
Daniel Turini17-Nov-03 2:20
Daniel Turini17-Nov-03 2:20 
GeneralRe: Kernel32.dll Pin
Mike Dimmick17-Nov-03 2:26
Mike Dimmick17-Nov-03 2:26 
GeneralRe: Kernel32.dll Pin
Ceri17-Nov-03 0:42
Ceri17-Nov-03 0:42 
GeneralNamed Pipe access problems across network Pin
Ceri16-Nov-03 22:40
Ceri16-Nov-03 22:40 
Generalconvert Pin
styve16-Nov-03 22:34
styve16-Nov-03 22:34 
Hi!

Need some help with a converting problem.
I will have my time in a buffer, but it complain on the converting. See code :

int main(){
char hour,minute, second;
int hh, mm, ss;
char buffer[10];
time_t times;
tm * ptm;

time ( × );
ptm = gmtime (×);

hh = ptm->tm_hour;
mm = ptm->tm_min;
ss = ptm->tm_sec;

hour = itoa(hh);
minute = itoa(mm);
second = itoa(ss);

strcpy(buffer, hour);
strcat(buffer, ":");
strcat(buffer, minute);
...

return 0;
}

the message that occur when I compile is

ctid.cpp: In function `int main()':
ctid.cpp:44: error: invalid conversion from `char*' to `char'
ctid.cpp:45: error: invalid conversion from `char*' to `char'
ctid.cpp:46: error: invalid conversion from `char*' to `char'

Thankful for your help



Generalconvert modify Pin
styve16-Nov-03 22:37
styve16-Nov-03 22:37 
GeneralRe: convert Pin
Prakash Nadar16-Nov-03 23:48
Prakash Nadar16-Nov-03 23:48 
GeneralRe: convert Pin
Michael P Butler16-Nov-03 23:58
Michael P Butler16-Nov-03 23:58 
GeneralMci32.ocx Pin
Prakash Nadar16-Nov-03 22:13
Prakash Nadar16-Nov-03 22:13 
Generalnetbios getting related info Pin
Member 65664816-Nov-03 19:35
Member 65664816-Nov-03 19:35 
GeneralRe: netbios getting related info Pin
David Crow17-Nov-03 4:19
David Crow17-Nov-03 4:19 
Generalshell32.dll version 5 - download! Pin
Member 70440716-Nov-03 19:33
Member 70440716-Nov-03 19:33 
GeneralRe: shell32.dll version 5 - download! Pin
Michael Dunn17-Nov-03 4:40
sitebuilderMichael Dunn17-Nov-03 4:40 
GeneralRe: shell32.dll version 5 - download! Pin
Member 70440718-Nov-03 23:22
Member 70440718-Nov-03 23:22 
GeneralBSTR FAR* : Help needed Immediately Pin
Member 65260616-Nov-03 17:59
Member 65260616-Nov-03 17:59 
GeneralRe: BSTR FAR* : Help needed Immediately Pin
paulb16-Nov-03 18:11
paulb16-Nov-03 18:11 
GeneralRe: BSTR FAR* : Help needed Immediately Pin
Member 65260616-Nov-03 18:17
Member 65260616-Nov-03 18:17 
Generalconverting char to wchar Pin
georgiek5016-Nov-03 17:37
georgiek5016-Nov-03 17:37 
GeneralRe: converting char to wchar Pin
paulb16-Nov-03 17:51
paulb16-Nov-03 17:51 
GeneralRe: converting char to wchar Pin
georgiek5016-Nov-03 18:02
georgiek5016-Nov-03 18:02 
GeneralRe: converting char to wchar Pin
paulb16-Nov-03 18:06
paulb16-Nov-03 18:06 
GeneralRe: converting char to wchar Pin
Mike Dimmick17-Nov-03 0:41
Mike Dimmick17-Nov-03 0:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.