would there be anything wrong with making an includes.h which has all of the .h files my project needs to link to.
or is it better to link to them when needed?

Recommended Answers

All 3 Replies

There's nothing wrong with it per se, but it's generally wiser not to confuse your readers with frivolous includes that aren't used in the file.

Well, I don't think it is necessarily 'bad', however if someone were to try and use your code as an example, it would be hard for the user to understand what files to include to do what you are doing. (Basically what Narue said).

As well, it may slow your application down. However, I am not entirely sure about this.

ok

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.