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/tie.cpp

16 lines
459 B
C++
Raw Normal View History

#include <iostream.h>
void main( void ) {
int num;
// Equivalent to:
cin.tie( &cout ); // cout << "Enter a integer:";
cout << "Enter a integer: "; // cout.flush();
cin >> num; // cin >> num;
cout << "The value of current tie: " << cin.tie() << endl;
cin.tie( 0 ); // unties the stream
cout << "The value of current tie: " << cin.tie() << endl;
}