摘要: 平时在读写文件时,我习惯了WIN32和C函数,今天试着用C++的风格来处理了一下。注意operator>中被我注释掉的代码,因为os#include struct user{ char name[32]; int age;};std::ostream& operator>(std::istream & is, user& user){ //is>>user.name>>user.age; is.read(user.name, sizeof(user.name)); is.read((char*)&user.age, sizeo 阅读全文
posted @ 2013-09-17 19:52 avexer 阅读(486) 评论(0) 推荐(0) 编辑