home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Supreme Volume 6 #1
/
swsii.zip
/
swsii
/
099
/
IOSTREAM.ZIP
/
EX_M13.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-07
|
489b
|
28 lines
// EXAMPLE MANIP-13
// DEMONSTRATE HOW TO READ IN A
// STRING AND RETAIN EMBEDDED
// WHITE SPACE, BUT BYPASS
// LEADING WHITE SPACE
#include <header.h>
const int length = 100 ;
int main()
{
char string [length] ;
const char quote = '\"' ;
cout << "Enter a string: " ;
cin >> ws ;
cin.get(string , length) ;
cout << "Your string: "
<< quote
<< string
<< quote
<< endl ;
return 0 ;
}