- 博客(2)
- 收藏
- 关注
原创 c++异常管理(二)---setjmp、longjmp与自动变量
首先上代码:#include <stdio.h> #include <stdlib.h> #include <setjmp.h>staticvoid f1(int,int,int,int); staticvoid f2(void);staticjmp_buf jmpbuffer; staticint globval; //静态全局变量,保存在bss或者data段intmain(vo
2015-07-07 10:34:03 489
原创 C++异常系列(一)----setjmp 与 longjmp
转载自 http://blog.csdn.net/chenyiming_1990/article/details/8683413setjmp与longjmp是非局部性跳转语句:非局部指的是,这不是由普通C语言goto,语句在一个函数内实施的跳转,而是在栈上跳过若干调用帧,返回到当前函数调用路径上的某一个函数中。#include<setjmp.h> int setjmp(jmp_buf env);
2015-07-07 09:13:41 1021 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人