Witam, widziałem podobny temat na forum ale nie pomógł mi. Mam oto taką klasę:
class Plansza
{
char kolej = 'k'; //domyslna kolej dla kolka
std::string _pole[3][3];
public:
void rysuj();
Plansza();
void pole_zapelnij();
struct nast_pole{
int x;
int y;
};
};
oraz taki kawałek kodu, który wywołuje ten błąd: Expected primary expression before '.' token.
cout<<endl; cout<<endl; cout<<endl; cout<<endl; //robienie przerwy
cout<<"Ktore pole chces zepelnic? Podaj kordynat X "<<endl;
cin>>Plansza::nast_pole.x;
cout<<"Ktore pole chces zepelnic? Podaj kordynat Y "<<endl;
cin>>Plansza::nast_pole.y;
chodzi oczywiście o Plansza::nast_pole.y/x