dynamic array

i am having trouble with this im not sure what to do.
this project is past due so i get no credit for it but i still want to know how it works here are the parameters for the project
A function that inputs an integer
√ A function that finds prime numbers between 2 and the input integer inclusive
√ A function that expands the array at runtime
√ A function that takes two arrays and copy one array contents to another array
√ A function that takes a prime integer and stores it to the array
√ A function that displays the entire array contents to the screen
√ You may implement the other functions for other operations. However, the
decision depends on the design of the project which is up to you.
√ Your program should handle the errors at runtime. For instance, if there is no
primes in the array, the program should display the message ‘Primes Not
Found!’ on the screen.
√ All the functions should use CALL BY ADDRESS mechanism for parameter
passing.
the array must expand from 0 using this formula (myarray*2+1)


this is what i have so far

#include <iostream>
using namespace std;

int main ()
{
//part one of the project
int outputint, i, j, x;
cout<< "please input the number you would like to output" << endl;
cin >> outputint;
///////////////////////

// integer inclusize prime numbers
for (int i=2 ; i <outputint; i++){
x=0;
for (int j=2;j<i; j++){
if (i%j==0){
x=1;
break;
}
}
if (x==0){cout << i << " is prime " << endl;
}
}
//dynamic array //
the dynamid array and prime input to the array is what is messing me up

please help
Topic archived. No new replies allowed.