blob: f67414116d4360f79d7ce87292b058fa934e8423 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include <iostream>
#include <fstream>
using namespace std;
int
main (int argc, char* argv[])
{
if (argc != 2)
{
cerr << "usage: " << argv[0] << " <file>" << endl;
return 1;
}
ifstream ifs (argv[1], ifstream::in | ifstream::binary | ifstream::ate);
if (!ifs.is_open ())
cerr << "unable to open " << argv[1] << endl;
if (ifs.tellg () == 0)
cerr << argv[1] << " is empty" << endl;
cout << "output" << endl;
return 0;
}
|