Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class base{
- protected:
- string model
- class Coins
- vector<Products> somename
- public:
- base(model,q,d,n)
- setproducts(selec, b, c, string a, int d)
- itemsInMachine.push_back({ selec, b, c, a, d });
- };
- //main
- vector<baseClass*> listOfMachines;
- while(inf.eof()){
- int q,d,n,sizeofitems
- inf >> modelname >> numberOfMachines
- for(int i =0; i = numberOfMachines; i ++){
- if(modelname == "100A"){
- inf >> q >> d >> n >> sizeOfItems;
- listOfMachines.pushback(modelname+to_string(i+1),q,d,n);
- for(int j =0;j <sizeOfItems;j++){
- listOfMachines[i]->setProducts(string select, int b, int c, string a , int d)
- }
- }
- if(modelname == //othertype of machie)
- //same procedures with the one on top
- the output would show that only the firsttwo machine would be initialized correctly and then the rest would be empty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement