Example Two is better. You should generally avoid having to depend on libraries needed by your program to be declared in other files. The main file has #pragma once enabled; so even if you declare all the libraries needed by main program in, in anther file, including them in your main will not incur any overhead