سؤال

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

void function()
{
  //do something;
  continue; //instead of return
}
هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top