I noticed sometimes developers do these in their project;
while(int x = 0) {//run code}
int y = 0;
if (y = someFunction())
{//run code}
I want ask;
- why c++ allow to do these in loops like while,(maybe for as well?) and if-else statements, what is the usage?
- when someone should do this in his project?
- and when conditions like these give result true?
Aucun commentaire:
Enregistrer un commentaire