Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <string>
- using namespace std;
- class Towar{
- public:
- double cena;
- };
- class Fotel : public Towar{
- public:
- string nazwa;
- };
- class Koszyk{
- private:
- vector<Towar> kosz;
- public:
- void Dodaj(Towar item){
- kosz.push_back(item);
- }
- double Koszt(){
- double wynik;
- for (Towar x : kosz){
- wynik += x.cena;
- }
- return wynik;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement