Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- class Tiles
- {
- public:
- std::string brand;
- unsigned int size_h;
- unsigned int size_w;
- double price;
- void GetData();
- };
- void Tiles::GetData()
- {
- std::cout << brand << " " << size_h << " " << size_w << " " << price << std::endl;
- }
- int main()
- {
- Tiles t1{"brand1", 1, 1, 1.0};
- Tiles t2{"brand2", 2, 2, 2.0};
- t1.GetData();
- t2.GetData();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement