How can I specify formatting options (ex: setw(4)) to a string using the sprintf function.
Example:
=============
char currentPosition[250];
sprintf(currentPosition, "X position: %f Y position: %f Z position %f", xPos, yPos, zPos)
=============
I want xPos, yPos and zPos to always be 4 characters wide.
What is the way to do this?
Also, if I use "char* currentPosition" to declare my string, I get an application error. Why is that?
Thanks