Topic: C++ strings and char * functions
Author: ray@cse.ucsc.edu (Ray Swartz)
Date: 28 Mar 1995 22:17:25 GMT Raw View
Now that strings are part of C++ will the functions that handle
char * be overloaded to handle strings, too?
An example would be the getline function. Currently, it takes
a char * argument to hold the characters read from cin.
Note that
cin >> stringVar
is only satisfactory for people whose programs only handle one word
of input at a time.
Ray Swartz
Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 29 Mar 1995 00:19:08 GMT Raw View
In article 2q1@darkstar.UCSC.EDU, ray@cse.ucsc.edu (Ray Swartz) writes:
>Now that strings are part of C++ will the functions that handle
>char * be overloaded to handle strings, too?
Some functions, yes, but certainly not all of them (the <string.h>
functions won't, for example).
>An example would be the getline function. Currently, it takes
>a char * argument to hold the characters read from cin.
Yes. At the last meeting, the C++ committee voted to add a string
version of getline.
---
Steve Clamage, stephen.clamage@eng.sun.com