is there a way to store all my include headers and call that one thing?

is there a way to have all the include header files in one place and i just put that variable name at the top of my main function? i ask cause i have a feeling im going to have alot of include headers on top
for example

if i have something like this on top
1
2
3
4
5
6
#include <something>
#include <something>
#include <something>
#include <something>
#include <something>
#include <something> 

is there a way to place them somewhere else and i just call that variable name location to include all those headers?
Well, you could put all the includes in a header, and only have to include that one header.
what do you mean ? care to give an example ?


do you mean like this ?


1
2
3
4
5
6
7
8
9
10
11
#ifndef HEADERS_H
#define HEADERS_H
#include <something>
#include <something>
#include <something>
#include <something>
#include <something>
#include <something> 


#endif 
Last edited on
Basically, yes. Just do that and then include headers.h, or whatever you name that file. That can slow things down, though: there's a reason the entire c/c++ standard library aren't always available all the time.
Topic archived. No new replies allowed.