Odnawiam temat i przepraszam za błędne nazwanie poprzedniego.
#include <iostream>
#include <string>
using namespace std;
class figura()
{
private :
int pozx;
int pozy;
string kolor;
int grubosclini;
public :
int getx()
{
return pozx;
}
int gety()
{
return pozy;
}
string getc()
{
return kolor;
}
int getl()
{
return grubosclini;
}
void polozenie(int a,int b) {
pozx = a;
pozy = b;
}
void zmienkolor (string c)
{
kolor = c;
}
void grubosc (int d)
{
grubosc = d;
}
figura(int a, int b, string c , int d)
{
pozx = a;
pozy = b;
kolor = c;
grubosclini = d;
}
figura(figura &o)
{
pozx = 0;
pozy = 0;
kolor = o.kolor;
grubosclini = o.grubosclini;
}
virtual void wyswietl()
{
cout<<" wyswietlanie"<<pozx<<endl;
cout<<" wfasdmf asd" <<pozy<<endl;
cout<<" wfasdmf asd" <<kolor<<endl;
cout<<" wfasdmf asd" <<grubosclini<<endl;
}
virtual ~figura ()
{
cout << "destruktor wirtualny" <<endl;
}
};
class okrag : public figura{
private:
int promien;
static int licznik;
public:
okrag():figura(3,5,"bialy",6)
{
promien = 3;
}
virtual ~ okrag ()
{
cout<< " deoko virt klasy okrag"<<endl
}
void wyswietl () {
cout<<" wywietlanie" << getx();
cout<<" wywietlanie" << gety();
cout<<" wywietlanie" << getc();
cout<<" wywietlanie" << getl();
};
int main () {
figura dwunastokat;
okrag pilka;
dwunastokat.wyswietl();
pilka.wyswietl();
pilka.setpox(100);
pilka.setpoz(100);
pilka.setkolor(niebieski);
pilka.wyswietl();
kopiapilka(pilka);
};
kompilator wykazuje mi błąd :
line 6 error: expected unqualified-id before ')' token|
== Build finished: 1 errors, 0 warnings ===
Jestem jeszcze początkującym programistą. I niestety nie jestem wstanie odnaleźć błędu w kodzie. Sądzę że jest to jakaś błahostka, więc jak mógłby ktoś poświęcić kilka minut byłbym wdzięczny