online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <vector> std::vector<int> getIntervalArray(int begin, int end, int interval){ int len = (end - begin) / interval + 1; std::vector<int> result(len); for (int i = 0; i <= len - 1; i++) { result.at(i) = begin + interval * i; } return result; } int main(){ int begin = 0; int end = 10; int interval = 1; std::vector<int> newResult = getIntervalArray(begin, end, interval); //print out elements of returned vector for(int i = 0; i < newResult.size(); ++i) { std::cout << newResult.at(i) << std::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