문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top