so I've been experiencing some strange issues with using #include
in header files. The goal is to make so any custom or common systems are all in one place that I can just include in whatever file I'm working on. This has been working so far, but I noticed recently that seemingly for no reason a new header file I add to it won't have access to any code that was included before it like the rest have. It's set up a bit like this:
// includes.h
#include <cstdlib>
#include <iostream>
#include <vector>
#include <map>
#include <random>
#include <cmath>
#include <memory>
#include "a.h"
#include "b.h"
#include "c.h"
Now what's happening is a.h
and b.h
can use all code from the includes from above them, and b.h
can use code from a.h
, but seemingly for no reason, c.h
cannot use any code from anything included above it, but occasionally making an entirely new header file with a different name will work. I'm unaware as to what could be causing this issue, and would love help understanding this problem. If any more clarification should be provided please let me know.