Results 1 to 6 of 6

Thread: this is embarrasing - how to make the dos window STAY

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    this is kinda embarrasing for me, well maybe not
    i havent touched c++ in over 6 months
    and today i got my laptop (YUMMMMM)
    i am cracking away at c++ and on the mission to learn that damn mfc n open"G"
    i made a little proggie..
    but when i run the program
    when the code is done the dos window goes BOOM and dissappears..

    ok now to the point
    there is a checkbox somewhere in the visual c++ IDE menu
    that i check/uncheck so that damn window stays til i press a button
    i looked EVERYwhere for it i coudn't find it
    anyone know what menu its under?
    its something like "console window" with a check mark beside it...

    thank you


  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    I can't find your checkbox, but I have the same problem, what I do is this, in my main procedure I put this

    Code:
    int main()
    {
    // /**/ ensures line is uncommented even if it is in a block comment
        
    /**/ int retval;
    
    //Place your code here
    
    /**/ cin >> retval;
    /**/ return retval;
    }

    that way the program waits for me to input a value before ending, and so the window doesn't disapear.

    It's not great but it'll do until someone finds your checkbox.

  3. #3
    New Member
    Join Date
    Apr 2003
    Location
    Ohio
    Posts
    7
    make sure that u have this as part of ur libary
    Code:
    #include <iostream>
    #include <stdlib.h>
    put this code where u want the program to wait

    Code:
      system("PAUSE");
    GL

    I had the same problem
    [vbcode]
    If time = 0:00 - 12:00 then
    msgbox "Asleep, Go Away",,"Asleep"
    else
    msgbox "borded stiff",,"Go Away"
    [/vbcode]

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    OpenGL rawks. Although I'd say use GLUT not MFC. Actually....check out http://ngl.sourceforge.net for something I've been playing with recently.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Try Project Options->Debug, it might be there.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6
    Addicted Member bataeu's Avatar
    Join Date
    Nov 2000
    Location
    Walla Walla, Washington
    Posts
    144
    I like using

    Code:
    cout << "Press any key to continue";
    
    getch();

    but you have to include conio.h
    C, C++ and none of that MCF crap either!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width