include
include
using namespace std;
void get_size(ifstream &in)
{
long b,e;
b=in.tellg();
in.seekg(0,ios::end);
e=tellg();
long size=e-b;
cout<<"size="<<size<<endl;
}
int main()
{
ifstream in("file.txt");
get_size(in);
in.close();
return 0;
}
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询