#include <iostream>#include <fstream>
#include <vector>#include <afx.h>using namespace std;
typedef vector<CString> do_pre1;typedef vector<CString> recv_pre2;
do_pre1::iterator i_do_pre;recv_pre2::iterator i_recv_pre;
do_pre1 do_pre;recv_pre2 recv_pre;
int main(int argc,char* argv[]){
char buff1[300]; fstream fff("txt.txt",ios::out|ios::in); CString strB; int ib1=-1; int ib2=-1; int ie1=-1; while(!fff.eof()) { fff.getline(buff1,299); strB = buff1; ib1 = strB.Find("do_pre"); ib2 = strB.Find("recv_pre"); ie1 = strB.Find(".XLS");// cout << ib1 << endl;// cout << ie1 << endl;//// strB= buff; if(ib1 != -1 && ie1 != -1 && ib1 < ie1 ) { // cout << strB << endl; cout << buff1 << endl; do_pre.push_back(buff1); }// if( ib2 != -1 && ie1 != -1 && ib2 < ie1)// { cout << strB << endl; // // recv_pre.push_back(strB);// }// ib1=-1;// ib2=-1;// ie1=-1; }
i_do_pre = do_pre.begin(); while(i_do_pre++ != do_pre.end()) { cout << *i_do_pre << endl; }// // i_recv_pre = recv_pre.begin();// while(i_recv_pre != recv_pre.end())// {// cout << *i_recv_pre << endl;// i_recv_pre++; }
cout << endl; return 0;}
