作者littleshan (我要加入剑道社!)
看板C_and_CPP
标题Re: [问题] 关於sizeof
时间Mon May 4 13:41:31 2009
※ 引述《herman602 (奸商)》之铭言:
: --
:
※ 发信站: 批踢踢实业坊(ptt.cc)
: ◆ From: 123.195.0.181
: 推 legnaleurc:ifstream的物件大小和档案大小无关吧 05/04 13:31
: → herman602:那如果我要测量档案大小要怎麽做 感谢@@ 05/04 13:33
ifstream fin("file.txt");
fin.seekg(0, ios::end);
cout << "file size is: " << fin.tellg() << " bytes." << endl;
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 219.87.151.2
1F:推 herman602:感谢!! 05/04 13:42