Missing Header files

This is a discussion on Missing Header files within the C Programming forums, part of the General Programming Boards category; Im using my program with strcmp in it and it works fine on my Turbo C++, but we have to ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    104

    Missing Header files

    Im using my program with strcmp in it and it works fine on my Turbo C++, but we have to run it at school on TCLite and I have to put in the #include <string.h>
    The problem is when I put in the include on my Turbo at home, it doesn't compile cause it gets the error that I don't have the string.h file, where can I get it ?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Either you have a typo in your code or your compiler is hopelessly broken. string.h is a standard header that is guaranteed to come with every hosted implementation of C.
    My best code is written with the delete key.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,505
    Yeah, but TC pre-dates ANSI in all likelyhood

    Considering the number of free ANSI-C compilers about, you should really consider getting something more up to date.
    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.

  4. #4
    Registered User
    Join Date
    Oct 2003
    Posts
    104
    well if it is actually missing, how come when I leave out the #include it works flawlessly....?

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,505
    Because the default rules for parameter passing 'work' for most of the historic functions.

    So long as you get the name right, the compiler and linker manage to do the right thing (providing you did the right thing).

    If you didn't, there's no hope of warning you, because you didn't include a header file with the correct prototypes.
    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.

  6. #6
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,157
    Originally posted by Salem
    Yeah, but TC pre-dates ANSI in all likelyhood
    But Turbo C Version 1.0 has string.h (so all others would too) so it seems as though his installation is hosed somehow.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 12-14-2005, 01:21 PM
  2. Header Files
    By Volair in forum C Programming
    Replies: 2
    Last Post: 12-09-2005, 09:51 AM
  3. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM
  4. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 03:49 AM
  5. odd errors from msvc std library files
    By blight2c in forum C++ Programming
    Replies: 6
    Last Post: 04-30-2002, 12:06 AM

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