online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <fstream> #include <vector> #include <algorithm> #include <iterator> #include <string> using namespace std; struct line : public string { using string::string; }; istream& operator>>(istream& s, line& l) { getline(s, l); return s; } int main() { fstream file("test.txt"); vector<string> text((istream_iterator<line>(file)), istream_iterator<line>()); swap(text.front(), text.back()); file.clear(); file.seekp(0); copy(text.begin(), text.end(), ostream_iterator<string>(file, "\n")); }
goodbye world middle hello world

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