Mam taki kod:
#include <cstdlib>
#include <iostream>
using namespace std;
class A
{
public:
int num_int;
A(int x)
{
num_int=x;
}
void Show_Data()
{
cout<<"Liczba calkowita: "<<num_int<<endl;
}
};
class B:public A
{
char tekst[20];
public:
B(int x,char txt[]):A(x)
{
for(int i=0;i<20;i++)
tekst[i]=txt[i];
num_int=x;
}
void Pokaz_Dane()
{
cout<<"Tekstem jest: "<<tekst<<endl;
}
};
int main(void)
{
A ob_A(1);
B ob(2,"Jaś Fasola");
//C ob_(3,”Benny Hill”);
ob_A.Show_Data ();
ob_B.Pokaz_Dane ();
//C.Pokaz_Dane ();
}
Jestem początkujący więc proszę o wyrozumiałość.
Jak mam to zrobić żeby zadziałało.