易截截图软件、单文件、免安装、纯绿色、仅160KB

捕获ctrl+c信号量

#include<signal.h>
#include<stdio.h>
void ctrlhandler( int a )
{
printf("you have press ctrl+c \n");
/* close 相关操作*/
getchar();
exit(0);
}
int main()
{
signal(SIGINT,ctrlhandler);
/*其他操作*/
getchar();
return 1;


相关文档:

用C写的3D迷宫

          Boss说,要看OpenGL,看了快一个月,总算出了个像样的东西,用C写了个3D迷宫,
虽然只有350行
       代码,不过边学边写,足足写了一周时间,还是小有成就感的,活活活!
         &n ......

Linux C notes (BOOK UNIX)

Chapter 1: Thread
① thread functions
1. pthread_self();
2. thread existing
    you can get the value of rval_ptr just by  pthread_join(pthread_t tht, void ** rval_ptr)
    cancel a thread as the thread exits with PTHREAD_CANCELED in pthread_exit, this functio ......

Six BS HelloWorld from C World

#define _________ } 
#define ________ putchar
#define _______ main 
#define _(a) ________(a); 
#define ______ _______(){ 
#define __ ______ _(0x48)_(0x65)_(0x6C)_(0x6C) 
#define ___ _(0x6F)_(0x2C)_(0x20)_(0x77)_(0x6F) 
#define ____ _(0x72)_(0x6C)_(0x64)_(0 ......

C++中extern “C”含义深层探索 [转]



1.
引言
  C++
语言的创建初衷是“a better C”
,但是这并不意味着C++
中类似C
语言的全局变量和函数所采用的编译和连接方式与C
语言完全相同。作 为一种欲与C
兼容的语言,C++
保留了一部分过程式语言的特点(被世人称为“
不彻底地面向对象”
),因而它可以定义不属于 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号