Archived

This topic is now archived and is closed to further replies.

Getting numeric data from an edit box

This topic is 5276 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Pretty much all I know about edit boxes are how to get a string from them. Is there a such thing as a numeric edit box? I just need to get some numbers from the user, but after thinking about it this seems pretty involved unless there is a simple way to do it.

Share this post


Link to post
Share on other sites
Maybe this will help. If you can capture the "user input" as a string or a char*. Try using one of these lines:

//string example

string someStringiter;
int i = atoi(someStringiter.begin());

//char* example

char* someCharptr
i = atoi(someCharptr);

Input from user:
" -9885 pigs"
OUTPUT of i:
-9885


excerpts used in the above post were taken from the MSDN.

[edited by - Dublin on July 8, 2003 1:33:11 AM]

Share this post


Link to post
Share on other sites