Can you concatenate strings by using an operator, or is strcat the only way. Cuz what if you want to concatenate more than 2 strings together? I com from a vb background, and we use the + and the & operators. Does C have anything like this?
Can you concatenate strings by using an operator, or is strcat the only way. Cuz what if you want to concatenate more than 2 strings together? I com from a vb background, and we use the + and the & operators. Does C have anything like this?
> Does C have anything like this?
No.
Use strcat() in a loop if you need to do this.
But C++ strings support the + operator as meaning concatenate.
thanks for the reply... Ill use a loop.
you can also use sprintf() if you know how many strings need to be concantinated.