V
Vikas
I have a header file say A.h in which I have typedefed
typedef std::vector<std::string> StringVector;
Now there is second file say B.h in which a class B has a method
class B {
....
ParseData(const StringVector::const_iterator& begin, const
StringVector::const_iterator& end);
…
};
Now without #including A.h in B.h, how can I declare
StringVector::const_iterator properly in B.h. I tried to do a forward
declaration in B.h but I get compilation errors.
// Following gives compilation errors if I put it in B.h
Class StringVector::const_iterator;
Thank you for your replies.
Vikas
typedef std::vector<std::string> StringVector;
Now there is second file say B.h in which a class B has a method
class B {
....
ParseData(const StringVector::const_iterator& begin, const
StringVector::const_iterator& end);
…
};
Now without #including A.h in B.h, how can I declare
StringVector::const_iterator properly in B.h. I tried to do a forward
declaration in B.h but I get compilation errors.
// Following gives compilation errors if I put it in B.h
Class StringVector::const_iterator;
Thank you for your replies.
Vikas