What the heck...???

This is a discussion on What the heck...??? within the Tech Board forums, part of the Community Boards category; I try to run certain console programs on my computer but how come they automatically close themselves without warning? Does ...

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    195

    What the heck...???

    I try to run certain console programs on my computer but how come they automatically close themselves without warning? Does anyone else have this problem or know how to stop it? it has happened before but i just reinstalled the operating system. It gets quite annoying because i can barely run any program!

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Don't run it by double-clicking, try running it from the command prompt. I know there is another way to keep it from closing, but I'm not at home right now, so I'm not sure what it is.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  4. #4
    Registered User
    Join Date
    May 2003
    Posts
    195
    Originally posted by XSquared
    Don't run it by double-clicking, try running it from the command prompt. I know there is another way to keep it from closing, but I'm not at home right now, so I'm not sure what it is.

    No, but in any program, there are getch()'s and while loops to hold the exe open, but it still closes. Im inputting for some programs and it just closes, gayness.

  5. #5
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Originally posted by KneeGrow
    gayness.
    Only gayness is how the programmer is implementing it. Are you sure the input buffer is cleared before it gets to the getch() call? In my experience this problem is usally between the keyboard and the chair.

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,553
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  7. #7
    Banned
    Join Date
    Dec 2003
    Posts
    367
    bah. Forget getch(). getchar() is more universal.

  8. #8
    Registered User
    Join Date
    May 2003
    Posts
    195
    Originally posted by Thantos
    Only gayness is how the programmer is implementing it. Are you sure the input buffer is cleared before it gets to the getch() call? In my experience this problem is usally between the keyboard and the chair.
    chairs are for the weak, please, i program while playing basketball

    And have you ever thought about the possibility that when i runt he same programs at another location, they magically work? Im guessing thats not a problem with the buffer or the chair/computer stuff

  9. #9
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Here is a novel concept POST YOUR DAMN CODE IN THE PROPER FORUM

    BTW how they heck do you
    runt
    a program?

  10. #10
    Banned
    Join Date
    Dec 2003
    Posts
    367
    Gayness is not an insult anyhow.

  11. #11
    Registered User
    Join Date
    May 2003
    Posts
    195
    Originally posted by Thantos
    Here is a novel concept POST YOUR DAMN CODE IN THE PROPER FORUM

    BTW how they heck do you a program?
    Besides, gayness wasnt even pointed at anyone, i dunno why you take it so personally. I m just saying my computer is being gay... And you want me to post some code? Every one of my programs do that here i ll just post 1:

    Code:
    while (1) {
           cout<<"lalalala"<<endl;
    }
    and that program right there closes at certain times. Thantos, if you don't know the answer, you don't have to PMS on me

  12. #12
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    I know the answer, its that you aren't programming it correctly.
    I'm not taking it personally. But I hate idiots with a passion which is why I'm being an ass to you.

  13. #13
    Registered User
    Join Date
    May 2003
    Posts
    195
    if you know the answer, tell me how to code this program to make it stop closing on itself:

    Code:
    while (1) {
           cout<<"lalalala"<<endl;
    }

  14. #14
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Ask on the C++ board. Might also want to give such things as: OS, Compiler, FULL code.

    Besides infinate loops are bad and should be avoided.

  15. #15
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,553
    Enough already
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how the heck do i ftp?
    By Waldo2k2 in forum Tech Board
    Replies: 9
    Last Post: 03-03-2003, 05:51 AM
  2. What the heck does this mean/do
    By Silvercord in forum C++ Programming
    Replies: 7
    Last Post: 02-03-2003, 08:45 PM
  3. how the heck do i point to this?
    By Waldo2k2 in forum C++ Programming
    Replies: 9
    Last Post: 12-03-2002, 07:54 PM
  4. What the heck is wrong with this code?
    By Shadow12345 in forum C++ Programming
    Replies: 4
    Last Post: 09-25-2002, 02:58 PM
  5. what the HECK?!?!?!?
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 11-26-2001, 07:12 PM

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