getline()
-
Who could explain to me how getline is working? I checked already a tutorial about it, but I didn't understand well. THX
A "PLEASE" would have been highly appreciated. istream::getline (member functions) Declarations: Form 1 istream& getline(signed char*, int, char = '\n'); Form 2 istream& getline(unsigned char*, int, char = '\n'); istream::getline, Form 1 (member function) Declaration: istream& getline(signed char*, int, char = '\n'); Remarks: This form of getline does the following: _ extracts up to the delimiter, _ puts the characters in the buffer _ removes the delimiter from the input stream _ does not put the delimiter into the buffer istream::getline, Form 2 (member function) Declaration: istream& getline(unsigned char*, int, char = '\n'); Remarks: Extracts characters into the given char * until one of the following occurs: _ the delimiter (third parameter) is encountered _ end-of-file is encountered _ (len - 1) bytes have been read >>A terminating null is always placed in the output string. >>The delimiter is also extracted. >>The delimiter is not placed into the destination string. >>Fails only if no characters were extracted. ...Avenger
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
-
Who could explain to me how getline is working? I checked already a tutorial about it, but I didn't understand well. THX