- Jul 23, 2006
- 3,934
- 0
- 76
For Example I tried:
class TreeNode
{
public:
vector<TreeNode> children;
etc.....
};
This gives me an error stating:
ISO C++ forbids declaration of vector with no type.
How would I go about doing this?
EDIT: For the record it's the same error as giving:
vector<sfkljwoisjdfks> children;
In other words it's not recognizing the TreeNode type within TreeNode.
EDIT 2: I'm a noob, I forgot the "using namespace std;"
class TreeNode
{
public:
vector<TreeNode> children;
etc.....
};
This gives me an error stating:
ISO C++ forbids declaration of vector with no type.
How would I go about doing this?
EDIT: For the record it's the same error as giving:
vector<sfkljwoisjdfks> children;
In other words it's not recognizing the TreeNode type within TreeNode.
EDIT 2: I'm a noob, I forgot the "using namespace std;"
