String Concatenation ? [solved]

Massimo,

you've said in a previous thread that string operation are allowed in Arduino...
I've tried a printf() like this but it doesn't work !:-/
the compilator doesn't generate error !

What i'm doing wrong ?

printStringLCD(printf("Poeme %d ligne 1", Poeme));

i suppose this is very simple but i'm newb in C.
i just want to concatene a string with an integer variable !

regards

mrbbp

I've tried with an sprintf()

  sprintf(combo,"%s%d%s", "Poeme ", Poeme, "ligne 1");
  printStringLCD(combo);

No error but doesn't work anymore.
Nothing on LCD and Arduino led on pin13 Blink (on each main loop i suppose)
???

;D
I've found...

strcat(str1,str2);// append str2 to str1
// if str2 is an integer, have to convert it to string before append.
itoa(int2, str2, 10); // 10 is the radix

hope this'll help. and i'm not saying wrongs things
it's work for me::slight_smile:

mrbbp