
To be exact, i need C++ equivalent (using iostreams) to following C code, which i've been using when submitting programs:
[c]
const char *infile = "101.in", *outfile = "101.out";
char *ibuf = NULL, *obuf = NULL;
int main(void)
{
#ifndef ONLINE_JUDGE
freopen(infile, "rt", stdin);
freopen(outfile, "wt", stdout);
#endif
setvbuf(stdin, ibuf, _IOFBF, 8192);
setvbuf(stdout, obuf, _IOFBF, 8192);
}[/c]