>>677
According to the C++ reference
http://en.cppreference.com/w/cpp/io/basic_istream/getline
getline sets the ios::fail when count-1 characters have been extracted.
You would have to call filein.clear(); in between the getline() calls.