Thread: What to put in header files (.h)

  1. #1
    Registered User IndioDoido's Avatar
    Join Date
    Apr 2007

    What to put in header files (.h)


    I'm trying to organize a school project, and i would like to know if i can insert into header files the actual functions and structure code.

    typedef struct data
            int num;
            char name[50];
    void menu(*option, int number)
            int i;
            for(i=0; i<number; i++)
                    if(option != NULL)
                            printf("Example functon");
    "Artificial Intelligence usually beats natural stupidity."

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Structures, yes, but your actual functions you want in a .c file.

    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 11-12-2008, 11:00 AM
  2. Header files in .h
    By swgh in forum C++ Programming
    Replies: 5
    Last Post: 05-29-2008, 08:58 AM
  3. about #include files and header files
    By bulletbutter in forum C++ Programming
    Replies: 9
    Last Post: 04-18-2008, 10:24 AM
  4. Difference between .h and .c files
    By Metalix in forum C Programming
    Replies: 9
    Last Post: 01-19-2005, 08:38 PM
  5. header .h files
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 09-03-2001, 09:26 PM