Lets say I have lots of printf usage, but I want to store them in a string and print them all in one go. Imagine the case below:
printf("%d,", _counter);
printf("IS REAL,", _condition);
printf("%f,", _value);
printf("%d,\r\n", _time);
What I want to do is to build a string and use printf only once when I am sure that I want to print it on screen. For example the output of above code will be:
1,IS REAL,663,1044
In C# I would use StringBuilder....but how to do this in C?