1
I have a variable that is a char vector, and in this vector I need to insert a number that is an integer, searching it for another variable:
int quantidade;
char id[3] = 'p';
For example, if the quantity is 2, I need the string id to be "P2". How can I do this?
using sprintf doesn’t get simpler? doesn’t need to pick another string.
– Mathi901
@Mathi901 http://stackoverflow.com/questions/7315936/which-of-sprintf-snprintf-is-more-secure
– Maicon Carraro