Dev- C++

This is a discussion on Dev- C++ within the Tech Board forums, part of the Community Boards category; I know that when a program runs through Quincy there is always a message in the DOS window that reads ...

  1. #1
    Registered User Birdhaus's Avatar
    Join Date
    Nov 2005
    Posts
    11

    Post Dev- C++

    I know that when a program runs through Quincy there is always a message in the DOS window that reads something like "Press enter to return to Quincy" when the program is done running. I use Dev C++ and I was wondering if there was a way to set it up that will display the same message as Quincy. I would rather set it up that way so I don't have to worry about adding the "pause" line into all my programs so I can read my program if it has a lot of cout's. Thanks in advance.

  2. #2
    Registered User
    Join Date
    Sep 2005
    Posts
    196
    that might only work with quincy but i havnt used it so im not posotive but it most likely doesnt do that

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    163
    Create a template with a blank main function. Add in your system("pause") and return(0). Whenever you start a new source file, just load it from your template.

    There is no compiler option that I've found for this.

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Switch to Code::Blocks.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    That is not a critical component when writing programs. Actually, it'd be better to get used to using system("pause") and such things, because if you send your programs to someone else, it still closes and they can't see the program's output.
    CornedBee, this is no place for advertising.

  6. #6
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Quote Originally Posted by CornedBee
    Switch to Code::Blocks.
    Quoted for Truth. Although I have no Idea what the thread starter is talking about, I made the switch to Code::Blocks and it's much better.

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Quote Originally Posted by maxorator
    CornedBee, this is no place for advertising.
    But it is a place for solving problems. Dev-C++'s incapability of keeping console programs launched from within the IDE open (something that is trivial to implement!) has been the source of the same newbie question over and over and over for years. They never bothered to fix the problem, and as far as I know, Dev-C++ isn't even actively developed anymore.

    It's time to switch to a new and better open-source IDE, and Code::Blocks is that IDE.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Does wxDev-C++ do the same thing, I know it's more developed.

  9. #9
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    wxDev-C++ just adds the wx visual editor to Dev-C++, I think. It's mostly geared towards creating 32-bit GUI applications, not console pieces. So I doubt they will really have it put in.
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

  10. #10
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Code:
    But it is a place for solving problems. Dev-C++'s incapability of keeping console programs launched from within the IDE open
    You just can't add system("pause"), cin.get() or anything else like that into the end? You develop a large program and you just can't add it to the end? I'm not that lazy... are you?

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    system("pause") is Win32-specific. I tend to develop cross-platform programs under Linux. cin.get() has the usual problems with data remaining in the buffer.

    And of course, my program is designed to run under proper console conditions, i.e. launched from a script or the shell, so I'm definitely not going to add a "feature" that "keeps the console open" but really just hinders users of the program.

    Neither am I going to change my program every time I want to deploy a release instead of developing from within the IDE.

    I expect the IDE to accommodate me! That's what an IDE is for, isn't it?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Whats better, C-Free or Dev C++??
    By i_can_do_this in forum Tech Board
    Replies: 10
    Last Post: 07-07-2006, 04:34 AM
  2. New to Dev C++/<windows.h>...
    By Cilius in forum C++ Programming
    Replies: 3
    Last Post: 02-23-2005, 12:05 AM
  3. Glut and Dev C++, Programs not Quitting?
    By Zeusbwr in forum Game Programming
    Replies: 13
    Last Post: 11-29-2004, 07:43 PM
  4. DEV C++ Limitations?
    By Kirdra in forum Game Programming
    Replies: 3
    Last Post: 09-09-2002, 09:40 PM
  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