online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <fstream> #include <sstream> using namespace std; int main() { ifstream file_in("data.json"); stringstream buffer; buffer << file_in.rdbuf(); string contents = buffer.str(); file_in.close(); contents.pop_back(); contents.pop_back(); cout << contents << endl; contents += ",'lorem4.4'}}"; cout << contents; // możesz nadpisać ofstream file_out("data.json"); ofstream file_out("data_new.json"); // dla demonstracji inna nazwa file_out << contents; file_out.close(); return 0; }
{{'lorem1.1','lorem1.2'},{'lorem 2.1','lorem2.2', lorem2.3'},{'lorem3.1','lorem3.2'},{'lorem4.1','lorem4.2','lorem4.3'}}

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