including file problem

This is a discussion on including file problem within the C Programming forums, part of the General Programming Boards category; Hi, Can u solve the problem? When I compile a program in C my compiler will send a error "Unable ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,751
    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
    ZuK
    ZuK is offline
    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
    ZuK
    ZuK is offline
    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, 09: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, 01: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, 08:51 PM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 05:54 PM
  5. Rename file problem
    By Emporio in forum C Programming
    Replies: 2
    Last Post: 06-05-2002, 10:36 AM

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