int sprintf( char *buffer, const char *format [, argument] ... );

This is the prototype for sprintf function.

So your the code below won't compile at all.
Also, you are not doing exactly what the question is.


int value;

sprintf(value, "%i", strText);