Is there a function I can read up on which allows me to 'glue' two strings together to form one string?
Is there a function I can read up on which allows me to 'glue' two strings together to form one string?
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
Silly programmers...using long words like "concatenation" when "glue" is just as good.
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
Well that all depends if he wanted the input to be two small strings, which remain unchanged, and the return to be a third new string, the combination of the two.
Quzah.
Hope is the first step on the road to disappointment.
Have you tried Locktite SuperGlue 3?
I'm sure that "Locktite SuperGlue 3" internally uses strcat().
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
What's the header file for that?Originally Posted by esbo
#include "locktite.h"?
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
Nope, Locktite H seems to be a type of pencil: http://www.google.ca/search?hl=en&q=locktite.h&meta=
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
Code:char out[128]; const char *s1 = "hell"; const char *s2 = "o"; strcpy(out, s1); strcat(out, s2); or sprintf(out, "%s%s", s1, s2);