relaxxx
relaxxx

Reputation: 7824

Include file into entire project

is there any way to include one file into entire project? I want to have some globals and macros accessible from any file in project, but i do not really write #include in every file TY

Upvotes: 1

Views: 291

Answers (1)

nabulke
nabulke

Reputation: 11275

Use Visual Studio project settings:

Projekt Properties->Configuration Properties->C/C++->Advanced->Forced Include Files

This will use the specified include files in every source file.

MSDN Forced include


Alternativ:

If you use precompiled headers you could also add your globals/macros to the stdafx.h

Upvotes: 4

Related Questions