I'm trying to learn c++, so I gave myself a task- build "simple" game! I figured out almost all problems I' ve encountered, but I can't figure out this one. This function compiles, but it needs two true values instead of one true and the other false to break the loop. So what am I doing wrong in this function?
function()
{
int l=0, l1=0;
cout<<"Teraz Zgadujcie!"<<endl;
for(;(x!=l1)||(x1!=l); )
{
cout<<"Gracz1 zgaduje: ";
cin>>l;
cout<<"Gracz2 zgaduje: ";
cin>>l1;
}
cout<<"BRAWO! ";
if(l==x1)
cout<<"zwycieza gracz1!";
else if(l1==x)
cout<<"zwycieza gracz2!";
}