r...@zedat.fu-berlin.de (Stefan Ram) writes:
> Jivanmukta <
jivan...@poczta.onet.pl> writes:
>> bool get_next_line(std::string &line);
> ...
>> get_next_line()
>>returns spoilt line.
>
> You complain about get_next_line, yet you only show us its
> declaration, not its implementation. This means that you are
> still missing basics of C++ class implementation. You need to
> learn the fundamentals of C++ /before/ you can begin to edit
> such class implementations.
The fact that the OP didn't show us the implementation of a function
doesn't necessarily imply anything about their knowledge of C++.
We all forget things now and then.
> One might also add that get_next_line returns a bool, so it
> can never return a line.
Right, but it takes a std::string by reference, so it can update its
value. Saying that it "returns" a string is imprecise, but not horribly
so.
[...]
--
Keith Thompson (The_Other_Keith)
Keith.S.T...@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */