vector > vc; //File to vector http://stackoverflow.com/a/23072197/6793751 string line; ifstream fileStream(file); while(getline(fileStream, line, '\n')) { stringstream ss(line); vector numbers; string in_line; while(getline (ss, in_line, ',')) { numbers.push_back(stod(in_line, 0)); } vc.push_back(numbers); } /*TEST: GRADES FILE READ*/ // int rows=vc.size(); // for(int x=0; x