ignore

getline

#include <iostream>istream &getline(char *buf, streamsize num); istream &getline(char *buf, streamsize num, char delim);

The getline( ) function is a member of istream.

getline(char *buf, streamsize num) reads characters into the array pointed to by buf until either num–1 characters have been read, a newline character has been found, or the end of the file has been encountered. The array pointed to by buf will be null terminated by getline( ). If the newline character is encountered in the input stream, it is extracted but is not put into buf. This function returns a reference to the stream.

getline(char *buf, streamsize num, char delim) reads characters into the array pointed to by buf until either num–1 characters have been read, the character specified by delim has been found, or the end of the file has been encountered. The array pointed to by buf will be null terminated by getline( ). If the delimiter character is encountered in the input stream, it is extracted but is not put into buf. This function returns a reference to the stream.

Related functions are get( ) and read( ).




C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net