快一个月了,来个升级也不错啊,呵呵/**///////////////////////////////// coded by winc_fan 2007-5-24///**///////////////////////////////////#include <sstream> // 流主要与上面的一样升级的在文件替换函数/**//// 2.0 ostringstream outf;//输出流的临时区 outf << target.rdbuf(); //将目标文件输入临时区 contp = outf.str(); int idx = contp.find(virus); //查找病毒出现才位置 string vir=virus; contp.replace(idx,idx+vir.length(),""); //替换杀毒 contp+=buf; contp+=' '; //添加换行 }*/ //保存内容 temp << contp; // 杀度后输入 /**//// v1.0/**//* while(!target.eof()) { target.getline(buf,511024); std::string cockhorse; //木马 cockhorse=buf; //处理病毒的关键步骤跳过木马 if(cockhorse.find(virus)!=-1L) { int i=cockhorse.find(virus); if(i!=0) { contp+=cockhorse.substr(0,i-1); } continue; } 升级后操作会更方便,呵呵,看了一个月的书才看了怎么一点点的东西!!!///v2.0 的好处是不用在考虑(可恶的)buff大小了