-
A Silly Question!
Hello,
Well This is My first Post so well.... Nerver Mind....
Question -
I want to put to char* variables and make them into
e.g.
char* bla1
and
char* bla2
and
char* bla
i want bla to have bla1 folowed by bla2 for its data
anyideas
Could Some body answer this Silly Dum Question PLEASE!! :rolleyes:
-
If you want to combine character arrays, you use strcat to concatenate them, but you have to make sure that the size of bla is big enough to hold bla1, bla2 and a null terminator.
However, in C++ you should be using the C++ string class for your strings. They are much easier to use and more difficult to misuse. This is the perfect example. If you had string bla1 and bla2 and wanted to combine them, you would just use bla = bla1 + bla2.
-
OK,
That works Perfect.
Thank You very very very much. :cool: