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

Username:   Password: 
 RegisterRegister   
 Resetting a program
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
turwaa




PostPosted: Tue Apr 17, 2012 5:58 pm   Post subject: Resetting a program

I created this program which lets a user select what type of shape they want to create. I was wondering how I could get it to clear after the user has their shape displayed for them (I don't know where to put the "cls" funtion). Secondly, I was wondering when the person is picking how long/wide/high they want their shape, if they select a word instead of number then the program will tell them to re enter a correct value.
I have attached my program.[/quote]



shapecreator.t
 Description:

Download
 Filename:  shapecreator.t
 Filesize:  1.51 KB
 Downloaded:  42 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Tue Apr 17, 2012 6:12 pm   Post subject: RE:Resetting a program

For validation, you could use a loop and strintok (s : string)

That will take in a string, and result a boolean if the string entered is also compatible as an integer.
turwaa




PostPosted: Tue Apr 17, 2012 7:41 pm   Post subject: RE:Resetting a program

what do you mean? could you post that for me
Tony




PostPosted: Tue Apr 17, 2012 8:09 pm   Post subject: RE:Resetting a program

here -- strintok
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: