12345678910111213141516171819202122232425262728293031
#include <cstdlib> #include <iostream> #include <string> #include <sstream> #include <new> using namespace std; int main(int argc, char *argv[]) { int numName; int ctr; string * str; cout << "How many names you want to enter: "; cin >> numName; str = new (nothrow) int[numName]; for(ctr = 0; ctr < numName; ctr++) { cout << "Name number " << ctr << ": "; cin >> str[ctr]; } system("pause"); return 0; }