I'm currently coding a project for my Computer Science module but I'm having the problem of my string value defaulting to scientific notation if there are too many decimal places in the double value.
I've tried the obvious solution with ostringstream
and .str()
but it makes it into notation. I have to compile to the C++98 standard, so I cannot use modern solutions like std::to_string
.
I need the value to be casted into a string but it needs to maintain its formatting. any help would be appreciated.