online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <sstream> using namespace std; int main(int argc, char** argv) { stringstream ifs{"hello"}; if (ifs.bad() == true || ifs.eof() == true || ifs.fail() == true) { cout << "ifs state is bad" << endl; } else { cout << "ifs state is good" << endl; } ifs << "shirley"; ifs.clear(ifs.eofbit); // Set the eofbit if (ifs.bad() == true || ifs.eof() == true || ifs.fail() == true) { cout << "Shirley: ifs state is bad" << endl; } else { cout << "Shirley: ifs state is good" << endl; } return 0; }

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