Top "Getline" questions

A C function that reads an entire line from a stream.

C++ - Read in file lines separated by a comma

I tried looking up what I'm trying to do but I cant find specifically what I'm trying to do. I …

c++ ifstream getline comma
getline not asking for input?

This is probably a very simple problem but forgive me as I am new. Here is my code: #include <…

c++ getline cin
How can I ignore the "end of line" or "new line" character when reading text files word by word?

Objective: I am reading a text file word by word, and am saving each word as an element in an …

c++ arrays getline end-of-line
awk solution for comparing current line to next line and printing one of the lines based on a condition

I have an input file that looks like this (first column is a location number and the second is a …

awk getline
std::getline throwing when it hits eof

std::getline throws exception when it gets an eof. this is how I am doing. std::ifstream stream; stream.exceptions(…

c++ fstream eof getline
Read a line from the console

I am reading several string such as name , surname , student number and grades, the first three I have done as …

c++ cin getline
Why getline() throws 'std::ios_base::failure' when exception mask is not set to eofbit?

Consider the following code: ifstream in; try { in.exceptions ( ifstream::failbit | ifstream::badbit ); in.open(pConfLocation); } catch ( ifstream::failure e ) { …

c++ exception getline
Why is stringstreams rdbuf() and str() giving me different output?

I have this code, int main() { std::string st; std::stringstream ss; ss<<"hej hej med dig"<&…

c++ std stringstream getline sstream
Read lines from big text file in Swift until new line is empty: the Swift way

I have the following text file structure (the text file is pretty big, around 100,000 lines): A|a1|111|111|111 B|111|111|111|111 A|a2|222|222|222 …

swift readline getline
Erlang read stdin write stdout

I'm trying to learn erlang through interviewstreet. I just learning the language now so I know almost nothing. I was …

erlang stdout stdin getline