Answer the question
In order to leave comments, you need to log in
How to make a class prototype?
Hello. There are 2 classes.
The first class contains a vector that stores references to objects of the second class type.
And the second class is inherited from the first.
How to implement the definitions of these classes? Because always a class that is defined earlier swears that it does not know the second and the program fails to compile. How to be?
Answer the question
In order to leave comments, you need to log in
class Class2;
class Class1 {
std::vector<Class2*> v;
}
class Class2 : public Class1{
//...
}
https://en.wikipedia.org/wiki/%D0%9F%D1%80%D0%B5%D...
en.stackoverflow.com/questions/41844/%D0%97%D0%B0%.. .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question