473,441 Members | 1,928 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,441 software developers and data experts.

how to create a header file in c++

20
Hi all,

Can u tell me steps by step as how to create header file with my own defined functions and where to place it in TC folder. I tried to save it in INCLUDE but failed terribly.
Oct 22 '06 #1
9 15519
arne
315 Expert 100+
Hi all,

Can u tell me steps by step as how to create header file with my own defined functions and where to place it in TC folder. I tried to save it in INCLUDE but failed terribly.
Did you try to put it in the same directory as your source code file?
(What is TC, btw? Turbo-C?)
Oct 22 '06 #2
Shana
20
Yes TC for Turbo C, I have created header file called "header.h" and saved in include, and then I have created function program and had saved in LIB. After that I wrote a main program which use that function and header file and saved it in bin. Now the prob is when I compile it, I do not get any error however executing the program gives linker error that it does not recognise the function.
Oct 23 '06 #3
arne
315 Expert 100+
Yes TC for Turbo C, I have created header file called "header.h" and saved in include, and then I have created function program and had saved in LIB. After that I wrote a main program which use that function and header file and saved it in bin. Now the prob is when I compile it, I do not get any error however executing the program gives linker error that it does not recognise the function.
I am not at all familiar with Turbo C I have to admit, but:
- there should either be the concept of a "project" to which you add your header files; the IDE will then take care of compiling and linking all the stuff; or
- you have to define an include path to tell the IDE where it can find the headers

These are the typical approaches I would say.

Did you try to store your headers in the same dir as you cpp files? This would be a starting point.
Oct 23 '06 #4
Shana
20
yes i did try it, as far as i know the project thing is in Visual C++. Right now i cannot be online but I will come back tommorow with the enitre code as it is small program just to make sure that a header file can be created and linked with Turbo C++ libraries.
Oct 23 '06 #5
rounak
1
hi! any one of u can teach me how i can make my own header file using turbo c++??????
Feb 14 '07 #6
I think ARNE is correct. You should set the path to the "include" directory.
But here's a catch : If your IDE is supporting other programs, i.e. no linker errors are coming in other programs, then I think you should study the user manuals of TurboC++ get thinks right.
Pawan
Feb 14 '07 #7
actually i want to step by procese how to make header file in tourbo c please sende me the procese
Jul 2 '08 #8
Did you try to put it in the same directory as your source code file?
(What is TC, btw? Turbo-C?)
yes i want to step by step procese how to create my own library header file in torbo c editer
Jul 2 '08 #9
Kid Programmer
176 100+
In you main.cpp file or whatever you named it at the top did you put:
Expand|Select|Wrap|Line Numbers
  1. #include<header.h>
because if you didn't it wont work.
Jul 2 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Christian Giordano | last post by:
Hi guys, does anyone knows which are the functions I've to use to create a file, in this case a txt or a csv, that will be asked in runtime to the user to download it? So I suppose without creating...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
0
by: nail | last post by:
Hi. I have this xml file: <menu> <header caption="File"> <item header="File" caption="New File"></item> <item header="File" caption="Open File"></item> <item header="File" caption="Close...
18
by: Al | last post by:
I'm still trying to do this but it never worked! In a .cpp file, I write the code, and at the beginning, I write: #ifndef MYLIST_H #define MYLIST_H ....to end: #endif What's wrong with it for...
3
by: christiang | last post by:
Hi guys, I'd like to use Alexia thumbnail service. It's an interesting service, you pass an url to its cgi and you get a thumbnail of that url. Of course they don't have the screenshots of all the...
6
by: windandwaves | last post by:
Hi Folk Some of my clients asked me to create "fancy emails" for them (aka html formatted emails). I know how to make a nice html document, but I had trouble creating a simple way to provide...
5
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
40
by: Angus | last post by:
Hello I am writing a library which will write data to a user defined callback function. The function the user of my library will supply is: int (*callbackfunction)(const char*); In my...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.