Re: Problems with strcat parameters


[ Follow Ups ] [ Post Followup ] [ CS2604 Discussion WWWBoard ] [ FAQ ]

Posted by Arm on July 29, 1999 at 21:13:28:

In Reply to: Problems with strcat parameters posted by Cruinh on July 29, 1999 at 20:56:47:

strcat should work like this:

char target[64] = "First ";
char source[32] = "Second";
strcat(target, source);

target will then contain "First Second". Make sure that your target memory block is large enough to hold the combined string.

In your example:

char *output;
strcat(output, "/");

your app will core, since output is a dangling pointer... that might be your problem.

Also note that \ is c/c++ is really typed at "\\"...

did any of this help?
-A




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2604 Discussion WWWBoard ] [ FAQ ]