私は次のものを持っています...
int main(){
cout<<"Before subroutine"<<endl;
int returnvalue = subroutine();
cout<<"After subroutine"<<endl;
}
int subroutine(){
cout<<"Into subroutine"<<endl;
/*subroutine does its work
subroutine finishes its work*/
}
これで、上記が機能します。つまり、サブルーチンが終了した後に「サブルーチンの後」を見ることができます。
ただし、行をコメントアウトすると
cout<<"Into subroutine"<<endl;
ではsubroutine()
、サブルーチンが実行されていないようです。「サブルーチンの後」はまったく見られません。
これはバグのようです。これは解決策がある既知の問題ですか?