ENG
RUS
Timus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board
Common Board
[SPbSU ITMO] Yuri Bedny
How to assign cin, cout to files in C++??
[1]
18 Jun 2002 20:03
Andrey Popyk (popyk@ukr.net)
Re: How to assign cin, cout to files in C++??
19 Jun 2002 11:52
#include <fstream.h>
int main()
{
ifstream in("1.dat");
cin=in;
ofstream out=("1.sol");
cout=out;
....
return 0;
}
P.S. But in online judge fstream.h maybe not present.
© 2000–2026
Timus Online Judge Team
. All rights reserved.