Vector2List getPointsFromFile2D(std::string filePath) { std::ifstream file; // creates stream myFile file.open(filePath.c_str()); // opens .txt file if(!file.is_open()) { // check file is open, quit if not ApproxMVBB_ERRORMSG("Could not open file: " << filePath) } PREC a, b; Vector2List v; while(file.good()) { file >> a >> b; v.emplace_back(a, b); } file.close(); return v; }