All pastes #632513 Raw Edit

Zeug

public text v1 · immutable
#632513 ·published 2007-07-24 22:19 UTC
rendered paste body
int main(int argc, char *argv[]) 
{ 
    ifstream fInput; 
    ofstream fOutput; 
    string sRead; 
 
    fInput.open(argv[1], ios::in); 
    fOutput.open(argv[2], ios::out); 
     
    do{ 
        getline (fInput, sRead); 
         
        if (sRead.find ("Hallo1") !=-1)     
             fOutput << sRead << endl; 
 
        if (sRead.find ("Hallo2") !=-1)     
             fOutput << sRead << endl; 
 
        if (sRead.find ("Hallo3") !=-1)     
             fOutput << sRead << endl; 

    
    }while(!fInput.eof());  
 
    fInput.close(); 
    fOutput.close(); 
 
    return 0;