exe qerks

Sharky Forums


Results 1 to 4 of 4

Thread: exe qerks

  1. #1
    Engineer credit to *****! flutie98's Avatar
    Join Date
    Mar 2002
    Location
    CNSE UAlbany
    Posts
    4,111

    exe qerks

    ok im using microsoft visual c++ 5.0 as my compiler
    whenever i run my progs through the compiler they work but when i just run the exe from a windows whenever the thing that is supposed to do is done the dos window then just goes away, is there any command or way of making the msdos window stay up till a key is pressed or something along those lines
    |Core i5 2500K @ 4.6GHz|MSI Z77-GD65|8.0GB G.skill DDR3 1600|XFX AMD 6870|
    |Samsung 830 SSD|HP LP2465 24" LCD|Antec P280|Seasonic X750 PSU|H2O Cooling|Windows 7 x64|

    |Core i3 2100|ASRock H61-GM|8.0GB DDR3|AMD Radeon 6450|Kingston V100+ SSD|
    |Antec Fusion V2|Epson 8350 1080P 3LCD on 100" EliteScreen|

    |ThinkPad T420|Core i5 2520M|8.0GB DDR3|OCZ Vertex 4|

    Audio: Radeon 6450 (HDMI)->Onkyo TX-NR509 ->Polk M60/M30/CSII + Velodyne VX10

  2. #2
    NullPointerException rock's Avatar
    Join Date
    Sep 2000
    Location
    York, PA
    Posts
    6,203
    Alternatively, you could open a DOS session (command prompt), change to the directory where your exe is and run it directly. By definition, console applications should run from the console.

    Open Source is free like a puppy is free.

    It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames.

    Understanding Evolution

  3. #3
    Hammerhead Shark Big_Mac's Avatar
    Join Date
    Feb 2003
    Location
    Windsor, Onatrio, CANADA
    Posts
    1,672
    at the very beginning of your program: #include <stdio.h>
    at the very end of your main: getchar();

    the program will pause at the last line there until it gets a character from the standard input stream.

    it's as easy as that.
    Originally posted by Ferrett
    I'M SORRY. There were hot girls. I got distracted.

  4. #4
    Engineer credit to *****! flutie98's Avatar
    Join Date
    Mar 2002
    Location
    CNSE UAlbany
    Posts
    4,111
    Originally posted by Big_Mac
    at the very beginning of your program: #include <stdio.h>
    at the very end of your main: getchar();

    the program will pause at the last line there until it gets a character from the standard input stream.

    it's as easy as that.
    thank you
    |Core i5 2500K @ 4.6GHz|MSI Z77-GD65|8.0GB G.skill DDR3 1600|XFX AMD 6870|
    |Samsung 830 SSD|HP LP2465 24" LCD|Antec P280|Seasonic X750 PSU|H2O Cooling|Windows 7 x64|

    |Core i3 2100|ASRock H61-GM|8.0GB DDR3|AMD Radeon 6450|Kingston V100+ SSD|
    |Antec Fusion V2|Epson 8350 1080P 3LCD on 100" EliteScreen|

    |ThinkPad T420|Core i5 2520M|8.0GB DDR3|OCZ Vertex 4|

    Audio: Radeon 6450 (HDMI)->Onkyo TX-NR509 ->Polk M60/M30/CSII + Velodyne VX10

Posting Permissions

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