title: Stop on newline when using read(...)
body: <p>I need to read the NMEA sentences from a GPS connected through UART. The OS is Debian, and the language must be C++. To do so I'm opening the file with <code>open(...)</code> and reading a string with <code>read(...)</code>. However, this way I have to specify a string length, which breaks up the sentences. Instead I want to read until the end of the NMEA sentence. How may I use <code>read(...)</code> and stop on new line? Is there an option to <code>read(...)</code>?</p>