Код: Выделить всё
#include <fstream>
#include <iostream>
using namespace std;
#define TestFilename "test.txt"
int main()
{
fstream TestStream;
TestStream.open(TestFilename);
TestStream.seekg(ios::end);
cout << "Length of file " << TestFilename << " is "
<< TestStream.tellp() << endl;
return 0;
}при файле test.txt любого размера выводит 2. В чем же дело, как я понимаю он должен выводить длину файла?