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
You can use std::getline from to read whole lines and use a std::stringstream, from to parse the lines.