I think I have most most of this correct at this point. Getting a couple errors when compiling via G++ . Just trying to finish this up..
#include <iostream>
using namespace std;
int main()
{
int array_size = 0;
int number;
int* list = new int[array_size];
cout << "enter a positive number, when finished enter a negative number" << endl;
cin >> number;
while (number > 0)
{
list[array_size-1] = number;
int *temp = new int[array_size=1];
copy (list,list+array_size,temp);
delete list;
list = temp;
array_size++;
if (number[count] > 0);
{
for(int i=0;i<array_size; i++)
temp[i] = list[i];
delete[] list;
list = temp;
}
else
}
for (cout =0; count < array_size; count++)
{
cout << number[count] << endl;
}
}
return 0;
}