I am still wondering why an error message keeps on appearing when trying to declare a vector:
"Unknown type name 'setSize'"
#ifndef INTEGERSET_H
#define INTEGERSET_H
#include <vector>
using namespace std;
class IntegerSet
{
public:
IntegerSet();
IntegerSet(const int [], const int);
IntegerSet & unionOfSets(const IntegerSet &, const IntegerSet &) const;
IntegerSet & intersectionOfSets(const IntegerSet &, const IntegerSet &) const;
void insertElement(int);
void deleteElement(int);
void printSet();
bool isEqualTo(const IntegerSet &);
const int setSize = 10;
vector<bool> set(setSize);
};
#endif
PS : I had to add 4 spaces to every line in order to copy and paste the above code, because it all went out of format. Is there an easier way?