Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Checking if user's input is an integer, real, or string
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rockmanrock




PostPosted: Thu May 21, 2020 8:35 pm   Post subject: Checking if user's input is an integer, real, or string

Hello there,

I am trying to make a calculator of sorts, and when the user enters a string it will crash and tell me there is an "invalid real number input". How can I check if the user has entered a string so I can implement a fail-safe and allow them to try again?

Thanks for any help. Very Happy
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: