i would like to initialize a char array like this:
char msg[] = "something 12";
This works so far, but to hold my function more flexibel i would like to use a integer varible instead of the fixed "12".
So i would like to use something like:
int value = 12;
char msg[] = ("something %d", value);
But this seems not to work. Is there a smart way use a flexible initialization?
Thanks for your help.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…