Reputation: 302
I have been working on Dev c++ for a while, and often most of the source files I create ,generally include same header file declarations, #define directives and even some of the variables declarations. So is there a way to include all of this code for each new source file that I create, so that manual copying and pasting job is minimized
Upvotes: 0
Views: 86
Reputation: 20130
Dev-C++ I believe has GCC/MinGW underneath
Thus, you put all your common defs, ..., into one include file (lets call it config.h) and pass down GCC option -include
-include file
Process file as if "#include "file"" appeared as the first line of the primary source file.
Upvotes: 1