Jump to content
  • Advertisement


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


Getting numeric data from an edit box

This topic is 5489 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:

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!