jeudi 5 février 2015

What does this if assignment/statement mean in C++

Our professor gave us this code. It assigns a value to a char[] depending on the value of the first index in the array. He said it was an if statement but I've never seen one like this. I'm new to c++



temp.byte[0] = byte[0] == '0' ? '1' : '0';

Aucun commentaire:

Enregistrer un commentaire