anyone use bloodshed Dev-C++?

This is a discussion on anyone use bloodshed Dev-C++? within the C Programming forums, part of the General Programming Boards category; Just downloaded this but seem to be having some trouble running my programs. They compile and run, but once the ...

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    20

    anyone use bloodshed Dev-C++?

    Just downloaded this but seem to be having some trouble running my programs.

    They compile and run, but once the dos window has come up it immediatly closes and doesnt seem to wait for me to "press and key to continue"

    e.g

    Code:
    #include <stdio.h>
    
    int main ()
    {
    printf("Hello");
    return 0;
    }
    in my old compiler it would print "hello" and have "press any key to continue" and if hit a key and the window would exit.

    Now in dev-c++ it seems to run through the code once then immediatly close once it has completed.

    If I prompt for input it will show this, but then closes as soon as im done and want to output the results to screen.l

    If anyone understood all that...any ideas?

    Thanks,

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,162
    You have a couple of options:

    1) Run your program from the command line.
    2) Wait for input at the end of your program.
    If you understand what you're doing, you're not learning anything.

  3. #3
    #include<xErath.h> xErath's Avatar
    Join Date
    Jun 2004
    Posts
    722

  4. #4
    Banned
    Join Date
    Oct 2004
    Posts
    250
    add a
    Code:
    cin.get();
    or
    Code:
     system("pause");
    ;
    before the return 0;

  5. #5
    Registered User
    Join Date
    Sep 2004
    Posts
    20
    thanks guys.

  6. #6
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,162
    Quote Originally Posted by cgod
    add a
    Code:
    cin.get();
    or
    Code:
     system("pause");
    ;
    before the return 0;
    cin.get() is C++. This is the C forum.
    If you understand what you're doing, you're not learning anything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bloodshed Dev Stops Compiling
    By bengreenwood in forum C++ Programming
    Replies: 4
    Last Post: 11-11-2007, 02:25 PM
  2. bloodshed dev c++ help
    By rocketmanx in forum Game Programming
    Replies: 4
    Last Post: 07-28-2004, 02:57 AM
  3. Sleep on Bloodshed Dev C++
    By BigSter in forum C++ Programming
    Replies: 3
    Last Post: 11-15-2001, 09:17 AM
  4. Wait on Bloodshed Dev C++
    By BigSter in forum C++ Programming
    Replies: 1
    Last Post: 11-14-2001, 02:46 AM
  5. Tutorial about Bloodshed Dev!
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 11-13-2001, 06:42 PM

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