Why does Dev-C++ never compiles code for me?

This is a discussion on Why does Dev-C++ never compiles code for me? within the C++ Programming forums, part of the General Programming Boards category; even a simple "hello, world" program... it just wont compile so i am compiler-less cause i dont have another option! ...

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    4

    Why does Dev-C++ never compiles code for me?

    even a simple "hello, world" program... it just wont compile so i am compiler-less cause i dont have another option!
    plz help

  2. #2
    Registered User
    Join Date
    Oct 2002
    Posts
    291
    Please show your code.

    What version of dev-c++ ?

  3. #3
    Registered User
    Join Date
    Aug 2003
    Posts
    4
    the code is not the problem believe me
    it just puts up an empty dos window for a second and quits
    i tryed microsoft visual c++ works perfectly but dev c++ (latest version) does not work
    i have win xp pro sp 1 if you wonder

  4. #4
    1479
    Join Date
    Aug 2003
    Posts
    253
    type in
    Code:
    system("pause")
    right before your return 0; statement. That should fix the problem
    Knowledge is power and I want it all

    -0RealityFusion0-

  5. #5
    Registered User
    Join Date
    Aug 2003
    Posts
    11
    That explains it, The newest version is beta so it is not all complete and there are bugs, download version 4 it should work fine then.

  6. #6
    Registered User
    Join Date
    Aug 2003
    Posts
    4

    Talking thx

    ok i hope it will work thank you all i will post after i'll check it

  7. #7
    Registered User
    Join Date
    Aug 2003
    Posts
    4
    Thanks guys, all working now
    dev-c++ 4...

  8. #8
    *******argv[] - hu? darksaidin's Avatar
    Join Date
    Jul 2003
    Posts
    314
    Originally posted by Mung_Foo
    Thanks guys, all working now
    dev-c++ 4...
    If you do what RealityFusion said, it should work with Dev C++ 5. It maybe beta, but beta 4.982 doesn't sound like it's far from 5.0. Anyway, it works great for me =)

  9. #9
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Sounds like the compiler is working fine. Once your program executes, and returns from main, there is no reason for the box to stay open unless you catch it, and tell it to wait before the program ends (i.e. RealityFusion's code, or other pieces of code in the FAQ).

    If it wasn't compiling. It would print error messages in the IDE itself, and never run the program.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  10. #10
    Registered User
    Join Date
    Aug 2003
    Posts
    56
    I've started inserting
    Code:
    cin.get()
    so that I have to hit enter for the program to close.

    I spent a couple hours watching the "black box of doom" open and close in the blink of an eye before I realized that I needed something to pause the process.

    None of the beginning tutorials in C++ mention this; I think they were all written years ago when people were still using dos... a strange and bewildering time in computer programming

  11. #11
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    None of the beginning tutorials in C++ mention this

    Check out the stuff in How Do I...Level 1 here
    Away.

  12. #12
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Also note, you can run the program from a shell (or within something like emacs).
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. changing default code in dev c++?
    By 7stud in forum C++ Programming
    Replies: 1
    Last Post: 12-15-2005, 04:06 PM
  2. Writing Code
    By ILoveVectors in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2005, 12:27 AM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM
  4. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 03:28 AM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM

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