how i can pass inside a vector an array?
i know how to do it without classes but i don't know how to do it with constructor.
i try to create a 2nd constructor that takes array of integers and the size of array and initialize a vector.
header
#ifndef INTEGERSET_H
#define INTEGERSET_H
#include <vector>
using namespace std;
class IntegerSet
{
public:
IntegerSet();
IntegerSet(); //second constructor
IntegerSet unionOfSets(IntegerSet &,IntegerSet &);
IntegerSet insertSectionOfSets(IntegerSet &,IntegerSet &);
void insertElement(int);
void deleteElement(int);
void printSet() const;
bool isEqual(IntegerSet &);
private:
vector <bool> elements;
};
#endif /* INTEGERSET_H */
and in cpp
IntegerSet::IntegerSet()
{
elements.resize(100);
}
IntegerSet::IntegerSet()
{
//how i fix this one?
}