#include<iostream>
using namespace std;
class test
{
int *p;
int pn;
public:
test(int n) { p = new int[n]; pn = n; }
void setp();
int* getp() { return p; }
int getpn() { return pn; }
};
void test::setp()
{
int choice;
cout << "1:自动填充\n2:手动填充" << endl;
cin >> choice;
switch (choice)
{
case :
for (int i = ; i < pn; i++)
p[i] = i;
break;
case :
for (int i = ; i < pn; i++)
cin>>i;
break;
}
}
void main()
{
test A();
A.setp();
int*b = new int[A.getpn()];
b = A.getp();
for (int i = ; i < A.getpn(); i++)
cout << b[i] << endl;
}