int sigsuspend(const sigset_t *mask);//挂起进程直至信号发生
man手册的解释:
sigsuspend() temporarily replaces the signal mask of the calling process with the mask given by mask and then suspends the proces...
分类:
其他好文 时间:
2014-05-22 13:41:23
阅读次数:
329
#include
void main(){
const int count = 5;//定义数量
struct student{
char name[80];
float math,eng;
float aver;
}stu[count],temp;
//输入
for (int i = 0; i
scanf("%s%f%f", stu[i].name, &stu[i].m...
分类:
编程语言 时间:
2014-05-22 11:21:15
阅读次数:
312
题目链接:poj 2411 Mondriaan's Dream
题目大意:用1?2的木块填满n?m的矩阵有多少种方法。
解题思路:插头dp裸题。uva11270
#include
#include
typedef long long ll;
const int N = 13;
int n, m;
ll set, dp[N+5][(15];
void solve (int d,...
分类:
其他好文 时间:
2014-05-22 08:06:07
阅读次数:
177
常量对象与常量成员函数来防止修改对象,实现最低权限原则。可以用关键字const来指定对象是不可修改的,任何修改该对象的企图,都会导致编译错误。例如:constTimenoon(12,0,0);声明一个Time类的常量对象noon,并将它初始化为中午12点。C++不允许在常量对象上调用成员函数,除非成...
分类:
其他好文 时间:
2014-05-22 06:39:25
阅读次数:
229
求区间 [l,r] 满足 素数 = a^2+b^2 a b为任意整数打素数表,如何证明 此时的素数满足
%4==1 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace
std; 7 const int .....
分类:
其他好文 时间:
2014-05-22 05:31:29
阅读次数:
200
class word{public: word(){cout#includeusing
namespace std;class Text{public: static const int a = 1; ///static 数据成员独立与该类存在
///static int b = ...
分类:
编程语言 时间:
2014-05-22 00:51:09
阅读次数:
346
建议6:分清readonly和const的使用方法. 首先区分他们的各自特点.
readonly:运行时常量. const:编译期常量(决定了它肯定是静态的),只能修饰基元类型(string 也是属于基元类型),和枚举类型.
或许有人会问了,运行时常量和编译期常量有什么区别呢?那就先看一下代码 //...
分类:
其他好文 时间:
2014-05-21 22:29:57
阅读次数:
340
中的两个功能:这两个关键字可以一起使用,当一起使用时,它们的先后顺序是没有限制的,谁在前面都一样,const是指常量,static则表示静态变量,它们一起使用时则表示一个静态常量.当你声明一个变量并初始化后,你不想在后面的程序中对该变量进行修改的话,你就可以用const修饰符来修饰它,它告诉编译器这...
分类:
其他好文 时间:
2014-05-21 03:57:42
阅读次数:
225
AsI’mworkingonaproductthatwillmakeheavyuseofencryption,I’vefoundmyselftryingtoexplainpublic-keycryptographytofriendsmorethanoncelately.Tomysurprise,anythingrelatedI’vecomeacrossonlinemakesitlookmorecomplicatedthanitshould.Butit’snot.Firstofall,let’ssee..
分类:
其他好文 时间:
2014-05-20 21:05:11
阅读次数:
430
1. 文件的打开读写 关闭
int open(const char *pathname,int flag,…) 打开一个文件
成功则返回文件描述符,若出现则返回-1
flag可以取下面的常量
O_RDONLY 只读打开
O_WRONLY 只写打开
O_RDWR 读写打开
其它的常量 O_APPEND,O_CREAT,O_EXCL,O_TRUNC,O_NOCTT...
分类:
其他好文 时间:
2014-05-20 16:07:29
阅读次数:
269