Name: Anonymous 2007-07-10 22:35 ID:hlN0Scis
Dependency shit is one of the biggest reasons I hate C++. Consider these two files:
I need to put some kind of forward declaration in A.h for the vector<B>& parameter. Anybody have any idea what I'm supposed to put there? Because I don't have a clue.
Attempts like this:
template <class T> class vector;
cause Eclipse to permanently freeze. It's not surprising to find yet another bug in Eclipse (or CDT), but still.
What kind of horrible language would do this to people?!
--- A.h ---
//forward declaration
class A {
...
void doStuff( vector<B>& );
}
--- B.h ---
#include "A.h"
class B {
...
A a;
}
---I need to put some kind of forward declaration in A.h for the vector<B>& parameter. Anybody have any idea what I'm supposed to put there? Because I don't have a clue.
Attempts like this:
template <class T> class vector;
cause Eclipse to permanently freeze. It's not surprising to find yet another bug in Eclipse (or CDT), but still.
What kind of horrible language would do this to people?!