#include <iostream.h>istream &getline(char *buf, int num, char delim = '\n');

The getline( ) function is a member of istream.

The getline( ) function reads characters into the array pointed to by buf until either num characters have been read or the character specified by delim has been encountered. The array pointed to by buf will be null terminated by getline( ). If no delim parameter is specified, by default a newline character acts as a delimiter. 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. (Note that buf may also be of type unsigned char * or signed char *.)

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 © 2008-2017.
If you may any questions please contact us: