Witam
Mam problem z pętlą. Pętla wszystko fajnie wykonuje, jednak problem pojawia się gdy brakuje już punktów. Kręci pętlę w nieskończoność (w przypadku jeśli napiszę cout dla sprawdzenia) w innym wypadku nic nie robi. Pętla nie chce wyjść.
void PC(){
srand(time(NULL));
bool czyZnalazlesPunkt = false;
while(czyZnalazlesPunkt != true){
int i = rand()%8;
cout << i << endl;
if(((tablica[i]=='1') | (tablica[i]=='2') | (tablica[i]=='3')| (tablica[i]=='4') | (tablica[i]=='5') | (tablica[i]=='6') | (tablica[i]=='7') | (tablica[i]=='8') | (tablica[i]=='9'))){
tablica[i] = znakPC;
czyZnalazlesPunkt = true;
}
}
}