online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <vector> //I know it is considered bad practice for the below part. using namespace std; vector<int> numberStorage; int main() { while (cin) { int numInput = 0; cout << "Please enter:"; cin >> numInput; if(cin.fail()) { cout << "NO NUMBER" << "\n"; } if (numInput == 0) break; if (!cin || numInput < 0) { cout << "BAD INPUT" << '\n'; return false; } numberStorage.push_back(numInput); } }

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