If an error occurs, such as end of file being reached without reading any bytes, getline returns -1. Otherwise, the first ...
crasseux.com