Question

Suppose the code goes like this

void b()
{
...
}
void c()
{
    b();
}



is c considered terminated after the call to b but b has not yet terminated?

Était-ce utile?

La solution

You can verify using debug messages:

void b()
{
    cout << "b()" << endl;
}
void c()
{
    b();
    cout << "ended c()" << endl;
}

So, the ended c() appears after b() message.

Autres conseils

No, c() is not supposed to be terminated before b() is terminated in general case.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top