online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <fstream> using namespace std; int main() { std::string line, stringtobeSearched = "Foo8854.txt"; std::ifstream inFile("input.txt"); std::ofstream outFile("output.txt"); if(inFile) { while(getline(inFile, line, '\n')) { std::cout<<line<<std::endl; if(line != stringtobeSearched) { outFile << line << "\n"; } else { std::cout<<"string found "<<std::endl; } } } else { std::cout<<"file could not be read"<<std::endl; } inFile.close(); outFile.close(); return 0; }
file123.txt Bob56.txt' Foo8854.txt file113.txt Bob56.txt' Foo8854.txt file223.txt Bob96.txt' Foo8814.txt
file123.txt Bob56.txt' file113.txt Bob56.txt' file223.txt Bob96.txt' Foo8814.txt

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue