header

This is a discussion on header within the C Programming forums, part of the General Programming Boards category; i have created a header file with extension .h i m using dev-c++ compiler in my program i try to ...

  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
    Katy, Texas
    Posts
    2,309
    Try
    Code:
    #include "headername.h"
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  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
    Posts
    23,021
    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, 04: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, 03: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

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