-
February 27th, 2014, 03:08 PM
#1
Initializing Vector of Objects with NULL
class A; //forward defined in class B.h
class B
{
private:
vector<B> v1;
vector<B> v2[3];
public:
void Display()
{
cout<<v1[0].display()
}
}
I get error message forward Declaration of class A;
What is going on here. Is there a way I could initialize all the vectors of type B to be set to NULL in the constructor?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|