How to add a String to sprintf

I am the following statement:

String MachineSerial = "0123456789";

and i want to add this variable to my sprintf:

 sprintf(URL, "11.22.33.44/helloworld.php?ID=1700000000%s0000%s:%s:",MachineSerial,senseBuff,TotalCycleBuff);

This method surely does not work. i thought %s is for string, what am i doing wrong here?

%s is for string indeed, not for String :wink: Use a string and it's fixed :slight_smile:

septillion:
%s is for string indeed, not for String :wink: Use a string and it's fixed :slight_smile:

i tried that. It wont let me. It says string does not name a type.

Use a string char* MachineSerial = "0123456789";

Yayyyy.. thank you