Code Snippets

  

C++ Source Code


Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 117,573 C++ Programmers for FREE! Ask your question and get quick answers from experts. There are 2,038 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!




Stopping Output Window

Output windows remains open until you press enter.

Submitted By: Xing
Actions:
Rating:
Views: 3,016

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


There are currently no comments for this snippet. Be the first to comment!

Add comment


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





Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month