How can you convert the string 6.78 to a float? How can you convert a float 7.89 to a string?
Do both of these questions have similar answers?
How can you convert the string 6.78 to a float? How can you convert a float 7.89 to a string?
Do both of these questions have similar answers?
I agree with the AE Drew it works fine You can also use boost lexical cast if you have boost installed. Here is an example I found.
http://code-better.com/c/convert-string-integer-using-boost-lexicalcast
I also found that this question has been asked already so you can enjoy a fully contributed answer here:
How to convert a number to string and vice versa in C++
Hope it helps
What is your environment?
If it is Visual Studio and Windows, use atoi() and itoa().