I'm having trouble using opengl to display integers (it works only if they're 1-digit). I'm using glutStrokeCharacter in a function I found online to display them and I function that I created myself to convert them to char* (The one I made works perfectly with console applications).Some of the code I'm using is:
Function IntToChar is returning a pointer to a local object. Don't do it, as the local object goes out of scope when the function returns, and the memory it occupied may be re-used by some other process.
Try this. You will need to allocate the character buffer with sufficient space before calling the function.