Run Problem

This is a discussion on Run Problem within the C Programming forums, part of the General Programming Boards category; Hello guys, I m very much new on C. Need all of your help to improve. Right now I m ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    3

    Run Problem

    Hello guys,

    I m very much new on C. Need all of your help to improve. Right now I m getting one problem. I m writing the very basic program..

    Code:
    #include <stdio.h>
    
    int main() {
      printf("Hello World!\n");
      return 0;
    }
    When I complie it is showing success. But when I Run this program its not showing me the dos screen properly. Just for a flash the dos screen coming and going off. Not getting the solution. Please help

    John

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,437
    It's in the FAQ!
    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.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    In the FAQ there is a subject titled something like "I can run my program, but the screen disappears immediately". Try one of the resolutions suggested there.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    <Beaten.>
    Last edited by tabstop; 08-11-2008 at 02:22 PM.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    3
    wow! too fast replies. Many thaks guys. I m checking in FAQ now.

    Sorry guys. I m not able to get the solution in FAQ. Can anyone please guide me ??
    Last edited by blrjohn; 08-11-2008 at 02:45 PM.

  6. #6
    Registered User
    Join Date
    Mar 2008
    Posts
    43
    Uhm, trying searching for "disappears" in the FAQ....

  7. #7
    Registered User
    Join Date
    Dec 2007
    Posts
    3
    Yap. Now I got it. Thanks mingerso

    I added

    Code:
    getchar();
    Now its working

  8. #8
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,437
    http://www.daniweb.com/forums/thread139723.html
    Broadcasting your problems won't help.
    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.

  9. #9
    * noops's Avatar
    Join Date
    Jun 2008
    Posts
    108
    Quote Originally Posted by Salem View Post
    http://www.daniweb.com/forums/thread139723.html
    Broadcasting your problems won't help.
    How is the weather in your ivory tower?

  10. #10
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,437
    Try this one on for size - http://www.catb.org/~esr/faqs/smart-...ons.html#forum
    Then feel free to ignore people who actually help!.
    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.

  11. #11
    * noops's Avatar
    Join Date
    Jun 2008
    Posts
    108
    Quote Originally Posted by Salem View Post
    Try this one on for size - http://www.catb.org/~esr/faqs/smart-...ons.html#forum
    Then feel free to ignore people who actually help!.
    I'd love to see your faq about how to answer questions.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Words and lines count problem
    By emo in forum C Programming
    Replies: 1
    Last Post: 07-12-2005, 03:36 PM
  2. problem: online on winxp and linux red hat
    By gemini_shooter in forum Linux Programming
    Replies: 5
    Last Post: 05-29-2005, 02:14 PM
  3. Input File HELP, weird problem
    By gravity-1 in forum C++ Programming
    Replies: 5
    Last Post: 03-29-2005, 07:43 PM
  4. linked list problem
    By kzar in forum C Programming
    Replies: 8
    Last Post: 02-05-2005, 03:16 PM
  5. Edit Control problem
    By Malek in forum Windows Programming
    Replies: 3
    Last Post: 06-16-2002, 01:12 AM

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