标准c(c89,c99)原来不支持缺省参数
编译一个图象接口库,其中用到cvSaveImage( out_img_name, img); 编译报错:
too few arguments to function cvSaveImage
一下子就糊涂了,从来都是这么用 cvSaveImage 的。highgui.h里的函数原型也是定义了缺省的,
CVAPI(int) cvSaveImage(const char* filename, const CvArr* image, const int* params CV_DEFAULT(0)
);
查了一下,原来缺省参数是 c++的专利 --- 这都不知道, 汗~~~
相关文档:
pid_t pid=fork()
it has 3 situation for the return result pid
0 child
>0 parent process
<0 fork fail
fork create a new process and it parent live alse when the child process had been created ......
来自bccn C语言论坛
首先声明一点,本文为转贴。
浅谈C中的malloc和free
作者:lj_860603 阅读人次:43013 文章来源:本站原创 发布时间:2006-8-5 网友评论(32)条
原帖及讨论:http://bbs.bccn.net/thread-82212-1-1.html
在C语言的学习中,对内 ......
; 编译链接方法
; (ld 的‘-s’选项意为“strip all”)
; gcc -c not link
;
; [root@XXX XXX]# nasm -f elf foo.asm -o foo.o
; [root@XXX XXX]# gcc -c bar.c -o bar.o
; [root@XXX XXX]# ld -s foo.o bar.o -o foobar
; [root@XXX XXX]# ./foobar
; the 2nd one
; [root@XXX XXX]#
exter ......
实在无聊中就将原来的一些东西整理了一下,自己是个记性不好的人,隔断时间整理自己,同时也希望可以方便他人。
----------------------------------------------------------------------------------------------------------------------------------------
/**//*************************************************** ......