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/iostream/istream/ignore.cpp

14 lines
296 B
C++

#include <iostream.h>
void main( void ) {
char s[20];
int num = 3;
cout << "Enter a string:" << endl;
cin.ignore( num ) >> s;
cout << "The string you have just entered after discarding the first "
<< num << " characters: " << endl;
cout << s << endl;
}