Backspace
Backspace

Reputation: 302

Can I configure my Dev C++ or any other C++ compatible IDE to automatically include some code in every new source file that I create?

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

Answers (2)

Severin Pappadeux
Severin Pappadeux

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

SemperAmbroscus
SemperAmbroscus

Reputation: 1398

In eclipse you can edit Templates

enter image description here

Link

Upvotes: 1

Related Questions