Advertisement
Guest User

Untitled

a guest
Nov 12th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. case 1:
  2.         {
  3.             int elem = std::stoi(vec.at(0));
  4.             std::to_string(elem);
  5.  
  6.             std::cout << "ERROR: Weight sensor measurement only" << endl;
  7.             std::cout << "ERROR: Ignore line " << nline << " of the input file" << endl;
  8.  
  9.             try
  10.             {
  11.                 int elem = std::stoi(vec.at(0));
  12.                 std::to_string(elem);
  13.             }
  14.             catch (invalid_argument)
  15.             {
  16.                 cerr << "ERROR: Weight sensor value read on line " << nline << " is not an integer" << endl;
  17.                 cerr << "Simulation terminated early : Please correct your data file" << endl;
  18.             }
  19.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement