Prev: What is the share mode fopen() uses?
Next: VS: operator <<(...const std::string&) does not call ->rdbuf()
From: Tim Roberts on 15 Nov 2009 18:12 Ray <Ray(a)discussions.microsoft.com> wrote: > >Thanks for your suggestion. However, my issue here is not how to accomplish >the task, which I can do, but rather, what precisely is wrong with the >approach I took in the code sample I provided. Scot told you the answer. Look at the documentation for getline. If the "get" terminates because it encountered the character limit before it found the end-of-line character, it sets "failbit" on the stream. Call cin.clear(); to clear the failbit condition. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
First
|
Prev
|
Pages: 1 2 Prev: What is the share mode fopen() uses? Next: VS: operator <<(...const std::string&) does not call ->rdbuf() |