Make libraries for yourselfThis tip submitted by Valseedian on 2005-06-07 16:15:15. It has been viewed 51065 times.
Rating of 5.9 with 246 votes
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.
:: as a note :: The extraneous header files must be saved into your includes folder(for dev-cpp) or into the includes directory.
Help your fellow programmers! Add a tip!