online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <sstream> #include <fstream> #include <vector> int main() { std::ifstream inputFile("input.txt"); std::vector<int> time,x,y; std::string line,tempRows; int rows; if(inputFile) { //get first value std::getline(inputFile, tempRows); std::istringstream ss(tempRows); ss >> rows; time.resize(rows); x.resize(rows); y.resize(rows); int i = 0; while(std::getline(inputFile, line) && (i < rows))//read line by line { std::istringstream ss2(line); ss2 >> time[i]; ss2 >> x[i]; ss2 >> y[i]; ++i; } } else { std::cout<<"File cannot be opened"; } //print out the elements of the vectors for(int i = 0; i < rows; ++i) { std::cout<< time[i] <<" "<<x[i] <<" "<<y[i]<<std::endl; } return 0; }
6 0 0 0 1 1 0 2 1 1 3 3 1 4 3 5 5 4 6

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