HEEEELP a student out. pleeeease!

Nov 22, 2015 at 9:56pm
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 Nov 22, 2015 at 10:40pm
Nov 23, 2015 at 12:44am
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 Nov 23, 2015 at 12:45am
Topic archived. No new replies allowed.