Problem in running turbo C code

This is a discussion on Problem in running turbo C code within the C Programming forums, part of the General Programming Boards category; Hi guys i hav a problem in running a code in turbo C, the files compiled succesful but when i ...

  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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    change your stone-age compiler to some more recent one... for example
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,622
    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
    India
    Posts
    515
    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, 07: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, 09:33 AM
  4. Replies: 5
    Last Post: 12-03-2003, 04:47 PM

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