定义于头文件 <fstream>
template< class CharT, class Traits std::char_traits<CharT> > class basic_fstream : public std::basic_iostream<CharT, Traits> 类模板 basic_fstream 实现基于文件的流上的高层输入/输出。它将 std::basic_i…
1.open
open, creat - open and possibly create a file or device
打开一个文件,也可能创建一个文件,返回文件描述符
//头文件
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
//接口
int open(const char *pa…
from __future__ import print_functionf open(test.pcm,rb)
n 0;
s f.read(1)
while s:byte ord(s)n n1print(0x%02x,%(byte),end)if n%160:print()s f.read(1)
print(\n\ntotal bytes: %d%n)
f.close()