using multiple objects

I'm trying to insert numbers into different objects,
I'm allocating an array for the number to be inserted, after its inserted the bool will be set to "true" corresponding to the number in the array

How can move objects so i can get to a,b whenever i wish?
After a new set is created, it should be in values[1]..[2]..and so on
int main()
{

IntSet a;
IntSet b;

a.insert(2);
b.insert(3);
}


void IntSet::insert(int num)
{
made();
int temp;
temp = num;
values[0][num] = true;
}


void IntSet::made()
{
int i = 0;
if(flag == false)
{
values = new bool*[10];
values[0] = new bool[101];
for(int count = 0; count < 101; count++)
{
values[0][count] = false;
}
flag = true;
}
else
{
values[1] = new bool[101];
}
i++;
}
Topic archived. No new replies allowed.