STRCAT
#1

Is it possible to format a string with strcat, like this:



new string1[128];
new string2[32] = "Hello";

strcat( string1, "%s", string2);

// do something with string2 here
Reply
#2

No, strcat simply concatenates two strings, nothing more, nothing less. If you want to insert variables you need to format your string first.
Reply
#3

So would I do it like this?

new string[128];
new string2[32] = "Hello";

format(string, 128, "%s", string2);
strcat(string, "Test");

// do something with string here
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)