Here is my understanding. A .h file is, as you said, a header file. As
such, it contains the headers of the .c (or .cpp) file with which it
is associated. For instance, if you make a dll with two functions, add
and subtract, you make the .c/.cpp file in which you define and code
the functions:
int add(int a, int b){
return(a+b);
}
int subtract(int a, int b){
return(a-b);
}
Now, in the .h file, you only define the headers:
int add(int a, int b);
int subtract(int a, int b);
Then, when you make the dll file, you can distribute the .h file along
with the dll. This lets those who use your dll get a look at exactly
what the functions are called, what they expect, and what variable
type they return, either as a substitute for, or in addition to,
documentation. Hope this makes sense.
On 2/9/12, Tyler <[email protected]> wrote:
> I don't program in C, but from the little I know about C, here's what I
> figured out. One time, I
> opened up the Windows folder in my Mpower, and I found a file called
> ceconfig.h.
> Normally, a .h file is a header file in a language such as C. And when I
> opened it in
> Keybook, it looked like what I picture C code to look like. Maybe I don't
> understand
> headers. Why would there be uncompiled C code in a file? I can understand
> EXE and DLL (because they
> are compiled code), but an H file looks like it's uncompiled C. Is there
> something that I don't
> know about header files?
> Tyler Z
>
>
--
Have a great day,
Alex (msg sent from GMail website)
[email protected]; http://www.facebook.com/mehgcap
___
Replies to this message will go directly to the sender.
If your reply would be useful to the list, please send a
copy to the list as well.
To leave the BrailleNote list, send a blank message to
[email protected]
To view the list archives or change your preferences, visit
http://list.humanware.com/mailman/listinfo/braillenote