Thread: Problem in running turbo C code

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    1

    Problem in running turbo C code

    Hi guys i hav a problem in running a code in turbo C, the files compiled succesful but when i run it the program does not appear on DOS, is there anyone who could help me.thanks

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    change your stone-age compiler to some more recent one... for example
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    What do you mean "the program does not appear on DOS"?

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by robwhit View Post
    What do you mean "the program does not appear on DOS"?
    The console window may open and close, too fast to see?

    add this variable to the list of your variables:
    int gar;

    which is short for garbage.

    Then add this line of code, just before the end of your program, in main():
    gar = getchar();

    This won't bother anything else in your code, and you'll be able to see your DOS console window, until you hit enter, now.

  6. #6
    Registered User
    Join Date
    Nov 2004
    Location
    USA
    Posts
    516
    The console window may open and close, too fast to see?

    add this variable to the list of your variables:
    int gar;

    which is short for garbage.

    Then add this line of code, just before the end of your program, in main():
    gar = getchar();
    Or you could run the executable from the command prompt. Start->run->cmd if you are running Windows XP
    Code:
    >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.

  7. #7
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by bulogi View Post
    Hi guys i hav a problem in running a code in turbo C, the files compiled succesful but when i run it the program does not appear on DOS, is there anyone who could help me.thanks
    Are you seriously still running DOS!!??

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem running code
    By michaelp in forum C++ Programming
    Replies: 4
    Last Post: 02-19-2008, 08:52 PM
  2. Problem with my morse code program
    By justin87 in forum C++ Programming
    Replies: 1
    Last Post: 10-21-2007, 05:23 PM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  4. Replies: 5
    Last Post: 12-03-2003, 05:47 PM