Pausing the screen with microsoft Visual

This is a discussion on Pausing the screen with microsoft Visual within the C++ Programming forums, part of the General Programming Boards category; I know how to Puase the screen, But with Microsoft Visual 6 it wont let me. It puts it in ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    2

    Question Pausing the screen with microsoft Visual

    I know how to Puase the screen, But with Microsoft Visual 6 it wont let me. It puts it in the wrong place and screws up my program. Please help.

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    So... what are you trying to use to pause it? What exactly's happening?

  3. #3
    Satan valar_king's Avatar
    Join Date
    Aug 2001
    Posts
    288
    try using endl like this:

    Code:
    //this
    cout << "Test" << endl;
    //as compared to this
    cout << "Test\n";
    -Save the whales. Collect the whole set.

  4. #4
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753

    er...

    you mean just do a pause with msvc++ 6.0?

    just do this:

    #include <conio.h>

    int main()
    {
    cout<<"Hello, now this program will pause"<<flush;
    _getch();
    return 0;
    }

    ok, if you are outputting something right before the pause, make sure you put in the flush, otherwise it won't print until you hit a key and the program continues. make sure after _getch() you have trailing semicolon: _getch();

  5. #5
    Unregistered
    Guest

    didn't work

    try this!

    #include <conio.h>
    #include<iostream.h>//must include

    int main()
    {
    cout<<"Hello, now this program will pause"<<flush;
    _getch();
    return 0;
    }

  6. #6
    Unregistered
    Guest

    Question NOT REALLY UNDERSTAND!!!

    hello,guys
    can i know why u put the #include<conio> function in there?
    one more thing!!

    why u put "FlUSH" behind the <<cout<< heLOO <<
    and what is the function of _getch ??

  7. #7
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    conio is the library for _getch, which waits for a user to press a key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to use microsoft visual c++ 2005 express edition
    By crazyheavyd in forum C++ Programming
    Replies: 4
    Last Post: 10-05-2007, 02:59 PM
  2. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 09:43 AM
  3. Apps that act "differently" in XP SP2
    By Stan100 in forum Tech Board
    Replies: 6
    Last Post: 08-16-2004, 10:38 PM
  4. errors in my class....
    By o0obruceleeo0o in forum C++ Programming
    Replies: 9
    Last Post: 04-14-2003, 03:22 AM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 04:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21