문제

Problem is - I have to implement my own exit(status) with setjmp and longjmp. Maybe someone could give some pointers?

도움이 되었습니까?

해결책

The only solution I think of right now, is to call setjmp early in main, and then create a MyExit function which does a longjmp to the setjmp in main and does a return with some value (provided from the longjmp call).

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