I am using following function to convert a double(mostly int) to string, it is doing good for values <1000000, but for >1000000 it is giving answers in exponential 1e+06
i want it to show full string instead of converting it to exponentials. ** I am using c++ <2008 so please post relevant answers for the same**
#include <iostream>
#include <sstream>
using namespace std;
std::string toString(double C)
{
stringstream tmp;
tmp << C;
return tmp.str();
}
int main()
{
cout<<toString(1000000)<<endl;
return 0;
}