
C/C++学习笔记
YouHa-
这个作者很懒,什么都没留下…
展开
-
exit(0)函数
exit是一个库函数,exit(1)表示发生错误后退出程序, exit(0)表示正常退出。 exit()使程序立即正常终止,如果状态值为0则认为正常推出,如果非零则说明存在执行错误。调用exit()清除和关闭所有打开的文件,写出任何缓冲输出,并且调用所有atexit()登记的程序终止函数。 相关函数: _exit()终止程序时,不关闭任原创 2009-03-10 20:03:00 · 3975 阅读 · 0 评论 -
malloc() 和 free()
实例:#include #include void main(){ int count,*array; //count是一个计数器,array是一个整型指针,也可以理解为指向一个整型数组的首地址 if((array=(int *) malloc (10*sizeof(int)))==NULL) { printf("不能成功分配存储空间。"); exit(1); } for转载 2009-03-10 20:48:00 · 774 阅读 · 0 评论 -
MFC CPropertySheet 多页面切换 实例
为了能实现在同一个页面实现多个页面的切换效果。CPropertySheet要与CPropertyPage一起使用。首先 新建一个MFC工程--MFC AppWizard(exe), 取名Pagesheet, 选择Dialog based, 然后Finish.2. 在对话框资源中插入两个对话框IDD_DIALOG1、IDD_DIALOG2,作为两个子页。为这两个对话框转载 2009-03-15 19:06:00 · 7912 阅读 · 2 评论 -
sys/timeb.h
NAMEsys/timeb.h - additional definitions for date and timeSYNOPSIS[XSI] #include DESCRIPTIONThe header shall define the timeb structure that includes at least the following members:转载 2009-03-22 15:12:00 · 3756 阅读 · 0 评论 -
ftime函数
NAMEftime - get date and time (LEGACY)SYNOPSIS[XSI] #include sys/timeb.h> int ftime(struct timeb *tp); DESCRIPTIONThe ftime() function shall set the time and millitm members of翻译 2009-03-22 15:32:00 · 2704 阅读 · 0 评论