1、二进制文件的输入输出:
ofstream in("num");//对象if(!in){}in.close();
2、二进制文件的输入输出:
ofstream in;in.Open("filename",ios::binary);char c[]={a'','b','c','d','e'};char *p=c;in.write(p,5);
3、ios::app、ios::ate、ios::in、ios::nocreate、ios::noreplace、ios::out、ios::trunc、ios::binary
转载于:https://www.cnblogs.com/shenchao/archive/2012/10/15/2725181.html