online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <sstream> #include <fstream> #include <vector> class Point { public: std::string ID = 0; std::vector<int> coords; Point(std::string id, std::vector<int> coord): ID(id), coords(coord) { } }; int main() { std::vector<Point*> points; std::ifstream file("input.txt"); std::string line; int var = 0; while (std::getline(file, line, '\n'))//read line by line { int j = 0; std::istringstream ss(line); std::string ID; ss >> ID; std::vector<int> coords(3);//create vector of size 3 since we already know only 3 elements needed while (ss >> var) { coords.at(j) = var; ++j; } points.push_back(new Point(ID, coords)); } std::cout<<points.size()<<std::endl; return 0; }
id1 1 2 3 id2 2 4 6 id3 5 6 7

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