- #1
Jamin2112
- 986
- 12
through the string?
I'm at a point in a program I'm making where I have a string representation of a valid decimal representation of a double. By "valid representation" I mean that it contains only characters in the set {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.'} with no more than 1 of '.'. I want to convert it to a double.
Here's the problem: The only procedure I can think of would require knowing in advance where the decimal place is. Or is there another way?
I'm at a point in a program I'm making where I have a string representation of a valid decimal representation of a double. By "valid representation" I mean that it contains only characters in the set {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.'} with no more than 1 of '.'. I want to convert it to a double.
Here's the problem: The only procedure I can think of would require knowing in advance where the decimal place is. Or is there another way?