siema zacząłem pisac krótki program i pomimo całej kompilacji wyskakuje mi jakis nie obsługiwany wyjątek
#include <iostream>
using namespace std;
class Pojazd
{
public:
string nazwa;
public:
virtual void jedz() { cout << "jade" << endl; };
Pojazd(string _nazwa) : aMember(0)
{
nazwa = _nazwa;
cout << "Konstruktor: Pojazd()" << endl;
}
~Pojazd()
{
cout << "Destruktor: ~Pojazd()" << endl;
}
int aMember;
};
class Lodz
{
public:
double wypornosc;
public:
Lodz(double _wypornosc) : bMember(0)
{
wypornosc = _wypornosc;
cout << "Konstruktor: Lodz()" << endl;
}
~Lodz()
{
cout << "Destruktor: ~Lodz()" << endl;
}
int bMember;
};
class Amfibia : public Pojazd, public Lodz
{
public:
Amfibia() : Pojazd(nazwa), Lodz(wypornosc), cMember(0)
{
cout << "Konstruktor: Amfibia()" << endl;
}
~Amfibia()
{
cout << "Destruktor: ~Amfibia()" << endl;
}
int cMember;
};
int main()
{
Amfibia obj;
obj.aMember = 0;
obj.bMember = 1;
obj.cMember = 2;
return 0;
}