running application from command prompt

This is a discussion on running application from command prompt within the C++ Programming forums, part of the General Programming Boards category; Hello.. When I run my application from command prompt, how can I terminate it without closing command prompt? (so that ...

  1. #1
    l2u
    l2u is offline
    Registered User
    Join Date
    May 2006
    Posts
    630

    running application from command prompt

    Hello..

    When I run my application from command prompt, how can I terminate it without closing command prompt? (so that I stay in a directory where I previously went to)

    Thanks for help

  2. #2
    Registered User
    Join Date
    Apr 2006
    Posts
    20
    Press 'Ctrl+C', that should work.

    (If not then try 'Ctrl+J')

  3. #3
    l2u
    l2u is offline
    Registered User
    Join Date
    May 2006
    Posts
    630
    Thanks. Ctrl + C works

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    Also, in rare cases where CTRL-C does not work, CTRL-break sometimes does.

    If it's your application that you're running you should code it so that you don't have to press CTRL-C. If you put a cin.get() or something at the end, just press enter and it should exit on its own. Unless you have an infinite loop or something.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    l2u
    l2u is offline
    Registered User
    Join Date
    May 2006
    Posts
    630
    Yes, I have infinite loop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need to edit text from within my application.
    By spiroth10 in forum C++ Programming
    Replies: 2
    Last Post: 12-15-2006, 02:15 PM
  2. Replies: 1
    Last Post: 09-18-2005, 09:06 PM
  3. Changing focus in an MFC Application
    By rangalo in forum Windows Programming
    Replies: 2
    Last Post: 06-20-2005, 06:21 AM
  4. MFC run application by clicking on file...
    By dug in forum Windows Programming
    Replies: 4
    Last Post: 12-02-2004, 03:33 AM
  5. Application running as a process in Win2k?????
    By J_Bravo in forum Windows Programming
    Replies: 8
    Last Post: 05-07-2002, 04:02 AM

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