It does roughly the same as this. Nothing useful because the array is deleted as soon as you have filled it.
1 2 3 4 5 6
vector<string> p( n );
for ( int i = 0; i < n; i++ )
{
cin >> p[i];
}
int size = n;
1 2 3 4 5 6 7
string *const p = new string[n]; // create a new array of size n
string s; // declare a string variable
string *q = p; // point q at the start of the array
while (cin >> s && q != p + n) // input strings (into s) until q points beyond the end of the array
*q++ = s; // set the array element pointed to by q to string s, then advance q to point at the next element
const size_t size = q - p; // this simply sets the size of the array; size = n would do
delete[] p; // delete the array you have input ... and done nothing with!