#pragma overce
Template
Class_INT2TYPE
{enum {_A = k};
Template
{
PUBLIC:
Static void enable ()
{
ES (_INT2TYPE
EI (_INT2TYPE
}
Private:
Static void ei (_INT2TYPE
{
Static Std :: OFSTREAM Conout ("conver);
Static Std :: ifstream Conin ("con");
IF (conveout.is_open ())
Std :: cout.rdbuf (conveout.rdbuf ());
IF (conin.is_open ())
Std :: cin.rdbuf (conin.rdbuf ());
}
Static void ei (_int2type
Static void ES (_int2type
Static Void ES (_INT2TYPE
{
File * pf;
IF (PF = FOPEN ("Con", "RT")))
_iob [0] = * pf;
IF (PF = FOPEN ("Con", "WT"))
_iob [2] = _ iOb [1] = * pf;
}
}
Template
Void openconsole ()
{
Static Bool First = True;
IF (first)
{
FigSt = false;
IF (allocconsole ())
{
_Nable <_NableStdio, _Nableiostream> :: enable ();
}
}
}
Instructions:
OpenCONSOLE
Next, you can use CIN, COUT, Printf, and Scanf to input and output the console.