Alright so I have a header file that includes another class with a pointer to a structure as a private variable. Does my second header have to be a pointer too or can it be static?
#ifndef EXAMPLE1_H
#define EXAMPLE1_H
struct ex {
int blah;
char meh;
};
class example1 {
public:
example1();
~example1();
private:
ex *ptr;
}
#endif
as my first header
#ifndef EXAMPLE2_H
#define EXAMPLE2_H
#include "example1.h"
class example2 : public example1 {
public:
example2();
~example2();
void blah();
private:
example1 test[8][8];
}
my actual code is for chess, but these two snippets are the jist of my question.