上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 39 下一页
摘要: classA{ public: f(int); }; 这里f函数其实有两个参数,第一个是A*const this, 另一个才是int类型的参数 如果我们不想f函数改变参数的值,可以把函数原型改为f(constint),但如果我们不允许f改变this指向的对象呢?因为this是隐含参数,const没法 阅读全文
posted @ 2016-07-27 22:10 PKICA 阅读(246) 评论(0) 推荐(0) 编辑
摘要: sort()函数是C++中的排序函数其头文件为:#include<algorithm>头文件; qsort()是C中的排序函数,其头文件为:#include<stdlib.h> 1、qsort() 六类qsort排序方法 qsort函数很好用,但有时不太会用比如按结构体一级排序、二级排序、字符串排序 阅读全文
posted @ 2016-07-27 21:42 PKICA 阅读(555) 评论(0) 推荐(0) 编辑
摘要: #ifndef RC4_H #define RC4_H #define KEYLEN256 256 class rc4 { public: rc4(); ~rc4(); void swap(unsigned char *a, unsigned char *b); //initial state in 阅读全文
posted @ 2016-07-17 19:16 PKICA 阅读(336) 评论(0) 推荐(0) 编辑
摘要: //heads.h #ifndef HEAD_H #define HEAD_H #include <iostream> #include <sys/shm.h> //share momery #include <unistd.h> #include <stdio.h> #include <strin 阅读全文
posted @ 2016-07-14 21:34 PKICA 阅读(617) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/shipfi/archive/2008/08/04/1260293.html 感谢作者! 程序变量查看文件中某变量的值:file::variablefunction::variable可以通过这种形式指定你所想查看的变量,是哪个文件中的或是哪个函数中的。 阅读全文
posted @ 2016-07-12 06:27 PKICA 阅读(415) 评论(0) 推荐(0) 编辑
摘要: 时间限制:3000 ms | 内存限制:65535 KB 难度:4 //C v0.1 AC #include<stdio.h> #include <stdlib.h> #include <string.h> #include <alloca.h> struct rectangle { int len 阅读全文
posted @ 2016-07-10 17:47 PKICA 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 300. Longest Increasing Subsequence 300. Longest Increasing Subsequence https://www.felix021.com/blog/read.php?entryid=1587&page=3&part=1 感谢作者! 标题:最长递 阅读全文
posted @ 2016-07-09 21:08 PKICA 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 int max(int a, int b); 5 int main() 6 { 7 int n; 8 scanf("%d", &n); 9 int i; 10 //arr stores data 11 int arr[101]; 12 //path sto... 阅读全文
posted @ 2016-07-09 16:10 PKICA 阅读(465) 评论(0) 推荐(0) 编辑
摘要: //pool.h 1 #ifndef POOL_H 2 #define POOL_H 3 #include 4 5 class pool 6 { 7 public: 8 pool(); 9 ~pool(); 10 11 void func(); 12 static void *schedule(void *ptr); 13 int s... 阅读全文
posted @ 2016-07-08 18:02 PKICA 阅读(711) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/scanery/article/details/7241890 感谢作者! 近来发现 在线程函数第一行调用 pthread_detach(pthread_self()) 返回值是22不是0,后来在网上找到以下话语: linux线程执行和windows不同,p 阅读全文
posted @ 2016-07-08 17:18 PKICA 阅读(412) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 39 下一页