I have to take integer input to an integer array. I have to identify the newline also in input. To be more clear, I have an example. The input I am giving is:-
2
int array[42]; int* ptr = array; for (string line; getline(cin, line); ) { istringstream stream(line); stream >> *ptr++; }
Error checking elided.