HEEEELP a student out. pleeeease!

Hey guys, I'm new C++ and I was handed this assignment by my professor. Who can help me with it?

Define a class called Set that stores integers in a dynamically allocated array of integers.
class Set
{
public:
void add(int n);
bool contains(int n) const;
int get_size() const;
................
private:
int* elements
int* size; };
In a set, the order of elements does not matter, and every
element can occur at most once.
Supply the add, contains, and get_size member functions and the
big three memory management functions:
1. Copyconstructor
2. Assignmentoperator 3. Destructor
Last edited on
So what have you tried?

By the way your size member variable doesn't really need to be a pointer.

And please use code tags when posting code.
Last edited on
Topic archived. No new replies allowed.