Thread: My command prompt won't work

  1. #1
    Registered User ytaipsw's Avatar
    Join Date
    Mar 2006
    Posts
    41

    My command prompt won't work

    geez i hate my computer
    whenever i open a .exe file with command prompt
    it closes instantly

    whats wrong?!

    thanks
    -ytaipsw

  2. #2
    Registered User
    Join Date
    Nov 2005
    Posts
    95
    What is the exe you trying to run ?

  3. #3
    Awesomefaceradcore bivhitscar's Avatar
    Join Date
    Apr 2006
    Location
    Melbourne, Australia
    Posts
    210
    I assume you are writing the programs that are closing instantly? Try putting in
    Code:
    system("PAUSE");
    before
    Code:
    return 0;
    it's ironic considerate rarity patron of love higher knowledge engulfs me...

  4. #4
    Registered User ytaipsw's Avatar
    Join Date
    Mar 2006
    Posts
    41
    didnt' work

    heres what i got

    Code:
    int main() 
    {
        puts("BLAH!");
        return(0);
    }

  5. #5
    Awesomefaceradcore bivhitscar's Avatar
    Join Date
    Apr 2006
    Location
    Melbourne, Australia
    Posts
    210
    Quote Originally Posted by ytaipsw
    didnt' work

    heres what i got

    Code:
    int main() 
    {
        puts("BLAH!");
        system("PAUSE");
        return(0);
    }

    Why don't people listen around here?
    Last edited by bivhitscar; 04-28-2006 at 07:13 PM.
    it's ironic considerate rarity patron of love higher knowledge engulfs me...

  6. #6
    Registered User ytaipsw's Avatar
    Join Date
    Mar 2006
    Posts
    41
    yeah buddy i know
    i did that it didnt' work
    but i figured it out
    im so dumb i opend it as an exe
    instead of using command prompt

  7. #7
    Awesomefaceradcore bivhitscar's Avatar
    Join Date
    Apr 2006
    Location
    Melbourne, Australia
    Posts
    210
    Hmm, strange. It works from the exe on my compy. What are you running?
    it's ironic considerate rarity patron of love higher knowledge engulfs me...

  8. #8
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    You could also try to put the correct h files at the top of your program.
    Code:
    #include <stdio.h>
    #include <stdlib.h>

  9. #9
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    You could have just read the FAQ on the topic, but it seems no one bothers with that...


    Quzah.
    Hope is the first step on the road to disappointment.

  10. #10
    Awesomefaceradcore bivhitscar's Avatar
    Join Date
    Apr 2006
    Location
    Melbourne, Australia
    Posts
    210
    What's a FAQ? Isn't that the noise a duck makes, or something?
    it's ironic considerate rarity patron of love higher knowledge engulfs me...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strcmp returning 1...
    By Axel in forum C Programming
    Replies: 12
    Last Post: 09-08-2006, 07:48 PM
  2. getline() don't want to work anymore...
    By mikahell in forum C++ Programming
    Replies: 7
    Last Post: 07-31-2006, 10:50 AM
  3. Why don't the tutorials on this site work on my computer?
    By jsrig88 in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2006, 10:39 PM
  4. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  5. DLL __cdecl doesnt seem to work?
    By Xei in forum C++ Programming
    Replies: 6
    Last Post: 08-21-2002, 04:36 PM