@xtorne21st
интересующийся
304 / 275 / 19
Регистрация: 25.09.2010
Сообщений: 1,056
|
22.12.2013, 22:17
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| #include <iostream>
#include <fstream>
static std::ifstream file("text.txt");
size_t GetFileSize()
{
if (file.eof())
{
return 0;
}
file.get();
return GetFileSize() + 1;
}
int main()
{
std::cout << GetFileSize() << std::endl;
} |
|
1
|