Nov 4, 2012 at 11:11pm UTC
I'm not talking about just a text file with code, I mean
a header file containing functions C++ or any other header library has.
:) Hope you can help. Thanks.
Nov 4, 2012 at 11:25pm UTC
I think the question may be not really about the header file, rather it is about the library file which contains the compiled code of the functions.
Nov 4, 2012 at 11:36pm UTC
I see. In which case, that's also easily answered. Write the functions, compile them (whilst telling your compiler that you want a library rather than an executable) and bingo - you've got a library. Link to it as usual.
Nov 4, 2012 at 11:51pm UTC
I don't think you get where I'm coming from. I want to create my own functions.
Nov 4, 2012 at 11:59pm UTC
And he told you how to do so. Create a header file, write your functions and then include the header wherever you need to call said functions.
2 3 4 5 6 7 8 9 10 11 12 //Header.h
int Func( int param)
EDIT: Although a header should only contain function declarations. You should stick the definitions in a separate cpp file.
Last edited on
Nov 5, 2012 at 12:00am UTC
Nov 5, 2012 at 12:36am UTC
You're going to need brick and mortar.
And love. Lots of love.
Love and cookies.