COMBINIG STRINGS TO BE SENT TO A SUBFUNCTION

HI EVERYONE,
i need some help in a project (i'm working on arduino uno r3 and macosx).
in the code that follows i'm using analogoneString and analogtwostring to send analog readings to a subfunction called sendmsg() that transmits them via morse code.
i would like to combine analogonestring and analogtwostring, separated by a "-" into a new unique string so that i can send the message by calling sendmsg() only once...
it should be something like this:

finalstring = analogonestring + "-" + analogtwostring
send (finalString)

THANKS!!

char analogoneString[5];
char analogtwoString[5];

sprintf ( analogoneString, "%d", analogRead(0) );
sprintf ( analogtwoString, "%d", analogRead(1) );

sendmsg( analogoneString );
sendmsg("-")
sendmsg( analogtwoString );

[code/]

Have you thought of using "strcat"?
Or simply extending your sprintf?

could you please write a little example? thanks

sprintf ( aSlightlyBiggerBuffer, "%d - %d", analogRead(0), analogRead(1) );

thanks i'll try it :wink: