Thursday, July 31, 2014

c++ read file

 string line;  
 while(getline(myfile,line))  
 {  
     istringstream is(line);  
     vector<double> tmp(3);  
     is>>tmp[0]>>tmp[1]>>tmp[2];  
     pts.push_back(tmp);  
  }  

No comments:

Post a Comment