If I have for example a double holding the value 128.65 and I want to present it as 128.650000
than I can do
sprinf(szStr,"%.10f,myDouble)
I tried using your advice and use std::stringstream
but what I managed to do is getting 0000128.65
what I did is:
std::stringstream buffer;
buffer.fill('0');
buffer << std::setw(nLen) << dValue;//nLen is the required length
//in this example it's 10
*psDest = buffer.str();
Can you pls show me how to do that?
thanks
avi