//_67_跳转函数
//_67_main.cpp
#include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
jmp_buf ebuf;//类型在<setjmp.h>中定义
void fun();
int main()
{
int i;
printf("1 ");
i = setjmp(ebuf);//返回值0;
if(i==0)
{
fun();//为什么下一句不会被打印呢
printf("This will not be printed.\n");
}
printf("%d\n",i);
system("pause");
return 0;
}
void fun()
{
printf("3 ");
longjmp(ebuf,5);//把setbuf置为5
}