samedi 24 novembre 2018

C++ if statement explanation confusion

I am new to C++ and sometimes it is difficult for me to understand complex if statements, could anyone help explain following code to me? Thanks in advance. Given:

int vis[25], g[25][25], Ty[25][25];

for (int i = 1; i < 30; i++)
{ 
if(!vis[i] && g[x][i] == 1 && Ty[f][i] != n) {...}
}

Vis[] is an array and only initialized and there is no any assigned value in it at the moment. So what does !vis[i] mean? Does it mean vis[i] !=0 or vis[i]==1 or something else ?

Aucun commentaire:

Enregistrer un commentaire