c++中请问怎样使用ifstream类的read()函数读取整个文件?

日期:2014-05-23 11:25:54 人气:1

c++中请问怎样使用ifstream类的read()函数读取整个文件?

用ifstream这系列读一个文件长度的方法: 如果fin是ifstream对象, fin.seekg(0, ios::end); FileLength = fin.tellg(); 另外友情提示: 这个函数的关键不在于第二个参数怎么写,第一个参数分配多长才是需要首先考虑的问题
    A+
热门评论