Compiler trouble

I had a lot of trouble trying to resolve a compiler error. I narrowed it down to one line of code:
#include "../include/myFile.h"

The problem is in UI.cpp, i have

#include "hge.h"
#include "../include/UI.h"

and this caused the compiler to choke and throw out tons of errors that were not descriptive and not helpful.

If i commented out #include "../include/UI.h" then i would get rid of the crazy compiler errors, but the file would be useless. I ended up reversing the includes, and everything worked great:

#include "../include/UI.h"
#include "hge.h"

WTF? Why would/How could this cause any problems?
hi are u using C++?
and UI.cpp is the name of ur program?
actualy im not getting ur point

this my first time to see such preprocessor directives without the libraries iostream.
#include "../include/UI.h"
#include "hge.h"

hope that u ll explain more :).
Topic archived. No new replies allowed.