Domanda

Does it make sense to use continue instead of return, while completing a function in C++?

void function()
{
  //do something;
  continue; //instead of return
}
È stato utile?

Soluzione

No, continue can be only used inside while, for, or do.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top