News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

Make Libraries yourself

Started by karthikn, Jul 25, 2008, 01:56 PM

Previous topic - Next topic

karthikn

Do you program on a daily basis? Do you find yourself using the same methods, classes or constants in multiple programs? Do you find yourself copying macro's constantly? Well use a library file instead.

Most compiler's I have used allow you to make a .cpp or .c(etc) file and then compile it and link it into any application that contains the corresponding .h file with the function or class declarations.

For example- I have produced nearly 30 METHOD headers for my programs.

One might deal with input/output manipulations. Another might define iterator macro's. Yet another might deal with variable manipulation or streaming. Then include them all into yet another header file and include it in all of your work, so you don't have to redefine these methods/variables/macro's in seperate files.

Note The extraneous header files must be saved into your includes folder(for dev-cpp) or into the includes directory