Exec newbie question

This is a discussion on Exec newbie question within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by Hunter2 >>You can use an input function at the end of you source, like the following example ...

  1. #16
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    Quote Originally Posted by Hunter2
    >>You can use an input function at the end of you source, like the following example
    Does that allow the user to input DOS commands? If not, how is it unique from any other solution posted above?
    It is not unique. It is relevant since Serrux appears to be looking for a solution that is compiler-specific. The point of the post was that there wasn't a solution other than what had already been posted and to cite the specifics straight from the website that supported the compiler. I'm sorry you missed it.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  2. #17
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    The point of the post was that there wasn't a solution other than what had already been posted and to cite the specifics straight from the website that supported the compiler. I'm sorry you missed it.
    Fair enough, although that last bit could be taken very much in the wrong way
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  3. #18
    Registered User
    Join Date
    May 2004
    Posts
    11
    I'm currently using GetCh() to solve my problem, I'm also pretty sure there are many different ways you could solve it with code. However I'm looking for a solution for it closing automatically if my code only includes
    cout<<"Hello"
    Or whatever, because after it finishes putting that up it will close (which is almost instantly). I'm also unaware if this is a compiler problem, or an issue with Windows just automatically doing it. I'm pretty sure it's windows because if anyone has every typed ipconfig or a similar command into dos prompt it might close automatically (therefore not allowing you to see what information is posted. My friend told me it was a windows issue but he forgot how he permanently solved it. If everyone is stumped I'll just go ahead and add that code in to all my programs, but for convenience it would be nice to permanently fix it. Thanks ahead of time.

    **EDIT or perhaps someone could refer me to a compiler that won't close? ***
    Last edited by Serrux; 06-04-2004 at 03:41 PM.

  4. #19
    Registered User jlou's Avatar
    Join Date
    Jul 2003
    Posts
    1,088
    If you don't want to change your code, you can change how you run the program. Just open a command prompt (Start->Run... cmd) and navigate to the directory with your executable. Then just run your executable from that command prompt every time you want to run it. After typing the exe name in the first time you only have to hit the up arrow and enter to run it again.

    I'm not familiar with the Dev-C++ IDE, but if you'd prefer to run it through a debugger (a good idea), you should be able to add a breakpoint to the last line of your code.

  5. #20
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>perhaps someone could refer me to a compiler that won't close?
    I do know that Microsoft Visual C++ 6.0 doesn't close, as long as you run the program by hitting the "execute" button. I can't tell you about .NET, since I don't have it, but I think it should be the same.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  6. #21
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    Quote Originally Posted by Serrux
    I'm pretty sure it's windows because if anyone has every typed ipconfig or a similar command into dos prompt it might close automatically (therefore not allowing you to see what information is posted.
    Look here. You'll have to register to see the solution, but that's a pretty fast process. If you'll allow me to paraphrase, they were unable to find a solution for it under Windows XP/2000 from the OS side.

    I agree with Hunter2. MSVC++ works. I can't remember if .NET does it or not.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  7. #22
    Registered User
    Join Date
    May 2004
    Posts
    11
    Do I have to purchase it? Or can I find a free version?

  8. #23
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Some introductory C++ books come with a free learning edition; I'm not sure if you can download that from their website or anything. Other than that, I think you'll have to buy it somewhere (you might want to try a university, they often give student discounts).
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stupid Newbie question
    By TimL in forum C++ Programming
    Replies: 4
    Last Post: 07-22-2008, 04:43 AM
  2. Newbie with Very Newbie Question
    By Jedi_Mediator in forum C++ Programming
    Replies: 18
    Last Post: 07-01-2008, 08:00 AM
  3. C prog newbie question
    By Draginzuzu in forum C Programming
    Replies: 1
    Last Post: 02-03-2003, 05:45 PM
  4. a stupid question from a newbie
    By newcomer in forum C++ Programming
    Replies: 4
    Last Post: 01-11-2003, 03:38 PM
  5. newbie class templates question
    By daysleeper in forum C++ Programming
    Replies: 2
    Last Post: 09-18-2001, 09:50 AM

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