It is my first time to use Kdevelop and I am also not very conversant with C++. I created two classes: Dead and Born.
They are declared in "dead.h" and "born.h" respectively.
The content of born.h is like the following:
Expand|Select|Wrap|Line Numbers
- ////////////////////////////////////////////////////
- #ifndef BORN_H
- #define BORN_H
- #include "dead.h"
- using namespace std;
- /**
- @author shark,,, <shark@KOF>
- */
- class born
- {
- public:
- born();
- ~born();
- public:
- dead test1;
- };
- #endif
- ////////////////////////////////////////////
Expand|Select|Wrap|Line Numbers
- ///////////////////////////////////////////
- #ifndef DEAD_H
- #define DEAD_H
- #include "born.h"
- using namespace std;
- /**
- @author shark,,, <shark@KOF>
- */
- class dead
- {
- public:
- dead_ele();
- ~dead_ele();
- public:
- born test2;
- };
- #endif
- ////////////////////////////////////////////
When I compiled the code, g++ complained:
/home/shark/TCL_project/peptide_world/src/born.h:44: error: 'dead' does not name a type
/home/shark/TCL_project/peptide_world/src/dead.h:42: error: 'born' does not name a type
But I indeed include all the necessary head file. How could that be? I tried to add the prefix of namespace reference, but it still complains...
Any ideas?