Suppose I have the following header file:
abc_header.h
class Abc
{
public:
int a;
int b;
int c;
};
typedef std::vector<Abc> AbcArray;
Then if I want to use this class, I can declare the function that use this class in this way without including the abc_header.h header file:
client1.h
class Abc;
void useAbc(Abc &pObj);
Only in the implementation part, the head file will be included. Then I have another function that will use AbcArray
class, and in this case it seems that I have to include the abc_header.h header in the function declaration part as the following shows:
client2.h
#include "abc_header.h"
void useAbcArray(AbcArray &array);
Any possibility of without including the header file? Thanks.