You are here:

C++/c language

Advertisement


Question
how to create my own header files in c language?

Answer
hi Swati

Create a file with .h extension and keep all the function definition there for example

create a file called function.h

#ifndef __FUNCTION_H
define __FUNCTION_H

void func1();
void func2();

#endif

now create a corresponding c file funcion.c and keep all the function declaration there

#include"function.h"

void func1()
{
.......
.......
}

void func2()
{
.......
.......
}

keep both the files inside your bin folder and now your header file function.h is ready to use.

Do lemme know in case if you find any problem with the same.

regards
Joydeep Bhattacharya
http://www.scodz.com

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Joydeep Bhattacharya

Expertise

TSR, Socket and Very Complex Mathematical Problem

Experience

Worked on many OOP projects with design patterns

Organizations
http://www.scodz.com

Publications
http://www.scodz.com

Education/Credentials
Master of Computer Applications

Awards and Honors
Being a proud owner of a website of programming called http://www.scodz.com

Past/Present Clients
http://www.funforu.com http://www.dhoondho.com http://analysingc.50webs.com

©2016 About.com. All rights reserved.