Thread: including file problem

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    16

    including file problem

    Hi,
    Can u solve the problem?



    When I compile a program in C my compiler will send a error
    "Unable to Include the .h file". My compiler is turbo c++.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    I'd say forget that old tech and get dev-c++.

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    16
    i know that is a old tech. But still there is many pepole who use it and face this problem oftenly that why I need to know the solve. Can u will pls help me?

  4. #4
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    since you are not showing any code I have to guess.
    This error happens if you
    Code:
    #include <myheader.h>
    instead of
    Code:
    #include "myheader.h"

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    16
    u find the real one.
    I find another way to solve it the user must install the file within the system partition insted of within a directory.
    R u think it will work?

  6. #6
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    That depends on what you are doing.
    If you are creating a library that you want to distribute then the #include<header.h> is the way to go. But then you don't put them to the "system partition". You put them into a library installation directory and make the user include this path in his library searchpath.
    If you are just working on some project specific header #include "header.h" is the right way.

  7. #7
    Registered User
    Join Date
    Dec 2005
    Posts
    16
    thanks 4 reply.
    My query on this topic now fulfilled.
    Thanks a lot

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. read from file problem
    By Martin Kovac in forum C Programming
    Replies: 1
    Last Post: 04-13-2009, 08:33 AM
  2. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  3. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  5. Rename file problem
    By Emporio in forum C Programming
    Replies: 2
    Last Post: 06-05-2002, 09:36 AM