how to join variable words into a single variable?

hey
for example
i have

const char DOOR="22";
const char KEY= "10";

const char link ="website.com/key/".[color=#32cd32]KEY[/color]."/door/".[color=#32cd32]DOOR[/color];

and wanted to get the result

link= website.com/key/10/door/20;

how can I "add" the words any kind of variables?

char buf[100];
snprintf(buf, sizeof(buf), "%s%d%s%d%s", prefixString, intOne, intermediateString, intTwo, suffixString);
Serial.print(buf);

google printf/sprintf/snprintf etc.

Using c strings, you first need a place to store them.

const char DOOR="22";
const char KEY= "10";

const char link ="website.com/key/"

char aStr[200]; // Room for 200 char string. (You can make it whatever fits plus some.)

strcpy(aStr,link); // Load in first bit. strcpy() copies to START of string.
strcat(aStr,KEY); // Next bit strcat() copies to the END of a string. Adding more to it.
strcat(aStr,"/door/"); // Next bit
strcat(aStr, DOOR); // Next bit

And no, with c strings you need to convert things into chars first. All your stuff here was already chars.

-jim lee

thanks its works