【文件属性】:
文件名称:C++stl标准库手册
文件大小:1.42MB
文件格式:RAR
更新时间:2013-07-17 04:56:23
C++
用来查找算法
如
istream::read
// read a file into memory
#include
#include
using namespace std;
int main () {
int length;
char * buffer;
ifstream is;
is.open ("test.txt", ios::binary );
// get length of file:
is.seekg (0, ios::end);
length = is.tellg();
is.seekg (0, ios::beg);
// allocate memory:
buffer = new char [length];
// read data as a block:
is.read (buffer,length);
is.close();
cout.write (buffer,length);
delete[] buffer;
return 0;
【文件预览】:
LibraryFunctions.chw
LibraryFunctions.chm