Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. class Tiles
  5. {
  6. public:
  7. std::string brand;
  8. unsigned int size_h;
  9. unsigned int size_w;
  10. double price;
  11.  
  12. void GetData();
  13. };
  14.  
  15. void Tiles::GetData()
  16. {
  17. std::cout << brand << " " << size_h << " " << size_w << " " << price << std::endl;
  18. }
  19.  
  20. int main()
  21. {
  22. Tiles t1{"brand1", 1, 1, 1.0};
  23. Tiles t2{"brand2", 2, 2, 2.0};
  24.  
  25. t1.GetData();
  26. t2.GetData();
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement