Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. Product parsing_text(string& line)
  2. {//Parsing text from file and building object type Product
  3.     //nazwy zmiennych
  4.     stringstream sstream(line);
  5.     string type, name, quantity;
  6.     double cost = 0;
  7.     size_t code = 0;
  8.     sstream >> type >> name >> quantity >> cost >> code;
  9.     Product::type kind = check_product_type(type);
  10.     quantity = check_product_quantity(quantity);
  11.     return Product(kind, name, quantity, cost, code);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement