Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1.  
  2. void readData(const string & filename, vector<double> & angleData, vector<double> & liftData) {
  3. ifstream inFS;
  4. double angle1; double lift1;
  5. //double angle2; double lift2;
  6.  
  7. inFS.open(filename.c_str());
  8.  
  9. if (!inFS.is_open()) {
  10. cout << "Error opening file";
  11. return;
  12. }
  13. while (!inFS.eof()) {
  14. inFS >> angle1;
  15. angleData.push_back(angle1);
  16. inFS >> lift1;
  17. liftData.push_back(lift1);
  18. inFS.ignore();
  19. }
  20. inFS.close();
  21.  
  22. return;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement