Thread: question regards to Turbo C

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    2

    question regards to Turbo C

    Hi All,

    I am trying to generate a 32MB lookup table for log function by using Turbo C compiler. I call log function from library to calculate the corresponding values, and then write them to a file.The problem was when I read the whole table from the file in the end, only the first 98 items were correct while the rest of it were all wrong. Does anybody know what's wrong with it? and how to fix it?Many thanks indeed!

  2. #2
    Registered User TheBigH's Avatar
    Join Date
    May 2010
    Location
    Melbourne, Australia
    Posts
    426
    We have no way of knowing what is wrong with your code if you don't show us your code. The only obvious problem I can see from the limited information provided is that you're using a hopeless, obsolete compiler.
    Code:
    while(!asleep) {
       sheep++;
    }

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Given that TurbidCrap can only access 640KB of memory, 32MB is a long way off.

    You fix it by getting a real compiler for your real OS. TC only works because of emulation magic.
    These are good choices for example.
    Free Developer Tools - Visual Studio 2010 Express | Microsoft Visual Studio
    smorgasbordet - Pelles C
    Code::Blocks
    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.

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    As a long time user of Turbo C, I feel well qualified to give you this opinion:

    < Kiss it goodbye, and Upgrade >

    I finally moved over in this last year (now using Pelles C for Windows), and although it takes some getting used to, it has capabilities that Turbo C could only dream about.

    For Windows and C only (not Linux and not C++), but with 64 bit versions, and *FREE*, plus a small expert forum, it's a great choice, imo.

  5. #5
    Registered User
    Join Date
    Oct 2011
    Posts
    2
    Thank you guys! Does Pelles C support for C++? How about borland C/C++ compiler?

  6. #6
    Novice
    Join Date
    Jul 2009
    Posts
    568
    Quote Originally Posted by Adak View Post
    < Kiss it goodbye, and Upgrade >
    I'd have gone with "Take it behind the barn and shoot it".

    Quote Originally Posted by DE4User View Post
    Thank you guys! Does Pelles C support for C++? How about borland C/C++ compiler?
    No. If you need C and C++ I'd suggest either MinGW, port of GCC to Windows, or Visual Studio Express if you have no aversions towards Microsoft. If you're on Windows, I'd go with VS Express. It's a good IDE, and it's free.
    Disclaimer: This post shows my ignorance at the time of its making. I claim ownership of but not responsibility for all errors in it. Reference at your own peril.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How am i going to do this in turbo c?
    By joseph7111991 in forum C Programming
    Replies: 1
    Last Post: 02-10-2009, 10:30 PM
  2. Turbo c ver 3.0.....
    By planet_abhi in forum C++ Programming
    Replies: 0
    Last Post: 05-31-2004, 09:35 AM
  3. turbo c 2.01
    By dune911 in forum C Programming
    Replies: 5
    Last Post: 07-16-2002, 10:32 AM
  4. Turbo C 2.01
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 05-10-2002, 09:59 AM
  5. dev c and turbo c
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 09-25-2001, 10:04 AM