I'm currently creating a project that utilized a lot of forward declarations and such so I've come across an issue where my #includes seem to be extremely redundant.
Example:
config.h
#include <Windows.h>
#include <vector>
config.cpp
#include "config.h"
#include "resolve.h"
#include <Windows.h>
#include <vector>
//functions that use extern functions/variables.
resolve.cpp
#include "config.h"
#include "resolve.h"
#include <iostream>
#include <Windows.h>
#include <winternl.h>
#include <TlHelp32.h>
//functions that use extern functions/variables.
main.cpp
#include "config.h"
#include "resolve.h"
#include <iostream>
//functions that use extern functions/variables.
Would it be better for me to do something like flow them so there aren't any duplicate #includes for something like this?
config.h
#include <vector>
#include <iostream>
#include <Windows.h>
#include <winternl.h>
#include <TlHelp32.h>
//declarations for config.cpp
resolve.h
#include "config.h"
//declarations for resolve.cpp
config.cpp
#include "resolve.h"
resolve.cpp
#include "resolve.h"
main.cpp
#include "resolve.h"
So this way everything already has the headers they need + the forward declarations?