class A
{
public:
void set(){
this->pole="1";
}
char* get(){
return this->pole;
}
A();
private:
char* pole;
};
class B : public A
{
public:
char* pole2 ;
char* get(){
return pole2;
}
B();
};
B* klasa = new B();
klasa->set(); // pole = 1;
klasa->get() // zwraca 1. dlaczego? nie powinna zwrocic pola2, czyli jakiejs randomowej liczby?
CZy to wina kompilatora bo zauwazyle, ze cos nie do konca mu wychodzi interpretowanie kodu