Click here to Skip to main content
15,889,315 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Multithreaded code and the volatile qualifier Pin
Stuart Dootson7-May-09 10:48
professionalStuart Dootson7-May-09 10:48 
AnswerRe: Multithreaded code and the volatile qualifier Pin
cmk7-May-09 17:09
cmk7-May-09 17:09 
Questionany problems with this code Pin
kaku_lala7-May-09 7:51
kaku_lala7-May-09 7:51 
Folks, I have been told that there is one logical problem with this code. Basically, this is an implementation of the library function strcat().

The intended beahviour of this function to concatenate ct to the end of s. Return s.

I could not find any logical problems with the code, apart from the fact that the final string should be NULL terminated, but I am not sure that can be classified as an error.

Could you help me find the error, if there is any.

char *strcat(char *s, const char *ct)
{
int i, start;
start = strlen(s);
for (i = 0; i < strlen(ct); i++)
{
s[start + i] = ct[i];
}
return s;
}

P.S. -
Is this the only correction needed in the code:
s[start+i]='\0'; \\after the loop
AnswerRe: any problems with this code Pin
David Crow7-May-09 8:56
David Crow7-May-09 8:56 
QuestionHELP [modified] Pin
yunpil7-May-09 7:40
yunpil7-May-09 7:40 
AnswerRe: HELP Pin
Cedric Moonen7-May-09 7:53
Cedric Moonen7-May-09 7:53 
JokeRe: HELP Pin
sashoalm7-May-09 22:39
sashoalm7-May-09 22:39 
QuestionRe: HELP Pin
CPallini7-May-09 9:31
mveCPallini7-May-09 9:31 
AnswerRe: HELP Pin
Wes Aday7-May-09 10:15
professionalWes Aday7-May-09 10:15 
AnswerRe: HELP Pin
Hamid_RT8-May-09 0:46
Hamid_RT8-May-09 0:46 
QuestionRasGetCustomAuthData fuction not working in non admin user. Pin
birajendu7-May-09 6:41
birajendu7-May-09 6:41 
QuestionCInternetSession with Authentification Proxy Pin
sashoalm7-May-09 6:06
sashoalm7-May-09 6:06 
AnswerRe: CInternetSession with Authentification Proxy Pin
Stuart Dootson7-May-09 7:32
professionalStuart Dootson7-May-09 7:32 
GeneralRe: CInternetSession with Authentification Proxy Pin
sashoalm7-May-09 22:37
sashoalm7-May-09 22:37 
GeneralRe: CInternetSession with Authentification Proxy Pin
Stuart Dootson7-May-09 22:42
professionalStuart Dootson7-May-09 22:42 
GeneralRe: CInternetSession with Authentification Proxy Pin
sashoalm8-May-09 0:34
sashoalm8-May-09 0:34 
GeneralRe: CInternetSession with Authentification Proxy Pin
Stuart Dootson8-May-09 2:04
professionalStuart Dootson8-May-09 2:04 
GeneralRe: CInternetSession with Authentification Proxy Pin
sashoalm8-May-09 4:32
sashoalm8-May-09 4:32 
GeneralRe: CInternetSession with Authentification Proxy Pin
Stuart Dootson8-May-09 4:47
professionalStuart Dootson8-May-09 4:47 
GeneralRe: CInternetSession with Authentification Proxy Pin
Stuart Dootson7-May-09 22:54
professionalStuart Dootson7-May-09 22:54 
Questioncapturing notify messages Pin
kitkat120127-May-09 6:00
kitkat120127-May-09 6:00 
AnswerRe: capturing notify messages Pin
led mike7-May-09 7:02
led mike7-May-09 7:02 
QuestionConfusion about object code generated? Pin
lionelcyril7-May-09 5:12
lionelcyril7-May-09 5:12 
AnswerRe: Confusion about object code generated? Pin
Eytukan7-May-09 5:20
Eytukan7-May-09 5:20 
AnswerRe: Confusion about object code generated? Pin
«_Superman_»7-May-09 5:22
professional«_Superman_»7-May-09 5:22 

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.