Results 1 to 3 of 3
Thread: convert string to a double?
- 11-26-2007, 08:48 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 5
- Rep Power
- 0
convert string to a double?
i posted a recent issue about rounding a double to two decimal places...i was able to use the decimalformat class but the only hitch is it converts the number to a string which means i need to convert it back to a double.
i tried casting but its not permitted, is there another way to convert (cast) a string to a double?
- 11-26-2007, 10:23 PM #2
Member
- Join Date
- Nov 2007
- Posts
- 2
- Rep Power
- 0
One possibility is to use the stringstream classes and read the string as if it is a character stream.
- 11-27-2007, 03:10 AM #3
Senior Member
- Join Date
- Nov 2007
- Location
- Newport, WA
- Posts
- 141
- Rep Power
- 0
Similar Threads
-
How to convert a string into a BigInteger
By valery in forum New To JavaReplies: 4Last Post: 09-13-2011, 01:32 PM -
How do I convert a decimal value to hexadecimal with double precision (64 bit)
By SKaur in forum New To JavaReplies: 7Last Post: 01-12-2008, 09:02 PM -
Converting String to Double
By srini in forum New To JavaReplies: 1Last Post: 12-24-2007, 08:03 PM -
type mismatch: cannot convert from double to float
By bugger in forum New To JavaReplies: 2Last Post: 11-16-2007, 01:24 PM -
Help with convert a double type number
By trill in forum New To JavaReplies: 1Last Post: 08-06-2007, 08:48 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks