This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/cplbexam/ios/unsetf.cpp

14 lines
227 B
C++

#include <iostream.h>
void main( void ) {
char ch;
cout << "Write a sentence:" << endl;
cin.unsetf( ios::skipws );
while( (cin >> ch).good() && ch != '\n' ) {
cout << ch;
}
cout << endl;
}