just read in until you get a newline character Code: file.getline(array,maxsizeofarray,'\n');
file.getline(array,maxsizeofarray,'\n');