Chat LIVE With Programming Experts! There Are 23 Online Right Now...

 

Code Snippets

  

C++ Source Code


Welcome to Dream.In.Code
Become a C++ Expert!

Join 244,146 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,349 people online right now. Registration is fast and FREE... Join Now!





Stopping Output Window

Output windows remains open until you press enter.

Submitted By: Xing
Actions:
Rating:
Views: 4,213

Language: C++

Last Modified: December 2, 2006

Snippet


  1. #include <iostream>
  2. #include <limits>
  3.  
  4. int main() {
  5.    
  6.   // Rest of the code     
  7.  
  8.   //Clean the stream and ask for input
  9.   std::cin.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );
  10.   std::cin.get();
  11.   }
  12.  

Copy & Paste


Comments


Emerald214 2009-03-03 10:36:57

why is it so long? What does it actually do?


Add comment


You must be registered and logged on to </dream.in.code> to leave comments.





Live C++ Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month