Code Snippets

  

C++ Source Code


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

Join 148,670 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,605 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: 3,390

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.




Be Social

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

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month