Why doesn't this work for checking a win?

Code:
//Check xWin 
bool xwin(string l1,string l2,string l3)
{
if (l1=="xxx")
 return true;
if (l3=="xxx")
 return true;
if (l2=="xxx")
 return true;
if (l1[1]=="x" && l2[1]=="x" && l3[1]=="x")
 return true; 
if (l1[0]=="x" && l2[1]=="x" && l3[2]=="x")
 return true;
if (l1[0]=="x" && l2[0]=="x" && l3[0]=="x")
 return true;
if (l1[2]=="x" && l2[1]=="x" && l3[0]=="x")
 return true;
if (l1[2]=="x" && l2[2]=="x" && l3[2]=="x")
 return true;
else 
 return false;
}
sorry if im getting annoying but this is due tomorrow at midnight and i have no idea what im doing