c++ - Write CSV file into vectors -
i have 8x14800 matrix has been extracted matlab csv file ("moves.mo"). need read file 14800 vectors 8 values each. can please navigate me here?
so far, here:
std::fstream inputfile; inputfile.open("moves.mo"); std::vector< std::vector<int>* > vectorsmoveslist; while (!inputfile.eof()) { std::string line; getline (inputfile,line); if(""!=line) { //if line nonempty std::vector<int>* mvec = new std::vector<int>(); //allocate vector vec(n) /* loop read file has go here */ } inputfile.close(); } return 0; }
thank very much!!!!
Comments
Post a Comment