Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » String to double
String to double [message #23985] Mon, 14 December 2009 11:28 Go to next message
exdatis is currently offline  exdatis
Messages: 7
Registered: December 2009
Location: Vojvodina
Promising Member
Sorry, but...
How,
edit.GetText() to double
Thanks! Embarassed
Re: String to double [message #23986 is a reply to message #23985] Mon, 14 December 2009 12:01 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Hello exdatis

It is not difficult. You can use:

atof(edit.GetData().ToString());

Best regards
Koldo


Best regards
IƱaki
Re: String to double [message #23987 is a reply to message #23986] Mon, 14 December 2009 12:07 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
double StrDbl(const char* s)

is the U++ way.

[Updated on: Mon, 14 December 2009 12:07]

Report message to a moderator

Re: String to double [message #23988 is a reply to message #23986] Mon, 14 December 2009 12:08 Go to previous messageGo to next message
exdatis is currently offline  exdatis
Messages: 7
Registered: December 2009
Location: Vojvodina
Promising Member
Thanks,
easy!
p.s. StrDbl(const char* s) it's work Confused
Re: String to double [message #23989 is a reply to message #23988] Mon, 14 December 2009 13:51 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
exdatis wrote on Mon, 14 December 2009 06:08

Thanks,
easy!
p.s. StrDbl(const char* s) it's work Confused


Be aware that if s does not represent double (e.g. is empty), StrDbl returns Null (which is represented by very high negative number and can be tested for using IsNull).

Mirek
Previous Topic: Incorrect position of chars in DocEdit ctrl.
Next Topic: Get enter key in EditString
Goto Forum:
  


Current Time: Thu Mar 28 10:49:51 CET 2024

Total time taken to generate the page: 0.01148 seconds