28 lines
499 B
C++

#include <iostream>
#include "Vlak.h"
int main() {
Vlak nik;
Vagon pot(34,56,TipVag::Potniski);
Vagon tov(23,67,TipVag::Tovorni);
Lokomotiva lok(56,78,1000);
nik.addPriklucek(&pot);
nik.addPriklucek(&tov);
nik.addPriklucek(&lok);
std::cout << nik.toString();
std::cout << nik.lenghtOfTranin();
std::cout << "\n\n\n";
std::vector<Prikljucek*> gen = Vlak::generate(6);
for(auto t: gen){
std::cout << t->toString();
}
return 0;
}