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

Username:   Password: 
 RegisterRegister   
 Hello world wtf?
Index -> Programming, C++ -> C++ Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Flikerator




PostPosted: Sun Jul 24, 2005 5:40 pm   Post subject: (No subject)

wtd wrote:
Flikerator wrote:
wtd wrote:
Flikerator wrote:
Ok I think I get it. So I only have to but a std::cin.ignore(); once in my program, not after each time I ask the user for input (Like every std::cin >> var).


The real question you need to ask yourself is this: Do you know what std::cin.ignore() is doing?


It discards input entered by the user. I need to know if it does it just once, or throughout the entire program.


It does it just the once, and just for that particular input stream.


Alright thats what I thought ty. Is it the only way to ignore enter as input? Seems tiresome to have that line of code after every input gathered from the user.
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Sun Jul 24, 2005 5:44 pm   Post subject: (No subject)

Try it with and without using ignore. Tell me if there's any difference.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 17 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: