Thread: header

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    11

    header

    i have created a header file with extension .h
    i m using dev-c++ compiler
    in my program i try to include it by using
    #include"headername"
    but its not working
    i have saved the headerfile in the same directory in which the programis stored

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Try
    Code:
    #include "headername.h"
    Mainframe assembler programmer by trade. C coder when I can.

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    11

    dont working

    i have tried it but its still not working

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Then find the filename and path of your header where it resides.
    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.

  5. #5
    Registered User
    Join Date
    May 2008
    Posts
    11
    Quote Originally Posted by Elysia View Post
    Then find the filename and path of your header where it resides.
    its in my documents now should i use
    #include"C/Documents and Settings/my Documents/header.h"

  6. #6
    Registered User
    Join Date
    May 2008
    Posts
    11
    thanks its done

  7. #7
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Er... No

    Put it with the rest of the source files or add "My Documents" as an include directory to your project.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  2. Obtaining source & destination IP,details of ICMP Header & each of field of it ???
    By cromologic in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-29-2006, 02:49 PM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM