摘要: 转自:http://www.cnblogs.com/wuzhenbo/archive/2012/06/13/2547664.html 程序1: void myMalloc(char *s) //我想在函数中分配内存,再返回 { s=(char *) malloc(100); } void main( 阅读全文
posted @ 2016-07-27 19:56 明明是悟空 阅读(1558) 评论(0) 推荐(0) 编辑
摘要: 转自:http://blog.sina.com.cn/s/blog_673ef8130100imsp.html 指针传递参数本质上是值传递的方式,它所传递的是一个地址值。值传递过程中,被调函数的形式参数作为被调函数的局部变量处理,即在栈中开辟了内存空间以存放由主调函数放进来的实参的值,从而成为了实参 阅读全文
posted @ 2016-07-27 19:36 明明是悟空 阅读(36340) 评论(2) 推荐(5) 编辑
摘要: 转自:http://blog.csdn.net/cws1214/article/details/12023093 when linux gdb debug, print a variable, such as i, by command p i; The gdb output value optim 阅读全文
posted @ 2016-07-27 15:16 明明是悟空 阅读(3359) 评论(0) 推荐(0) 编辑