- 博客(10)
- 资源 (32)
- 收藏
- 关注
原创 如何测试centos7.x crash 工具
检测内核配置挂载iso,配置本地yun源安装kexec安装kdump工具通过vmlinuxz-* 压缩内核获得 vmlinux 非压缩内核extract-vmlinux /boot/vmlinuxz-* > vmlinux压缩内核的查看,解压压缩内核的查看file /boot/vmlinuxz-*file /boot/vmlinux运行crash工具...
2019-05-17 00:24:10 687
原创 c++重载函数调用运算符
#includeusing namespace std;class toInt{ public: toInt(int a){ cout<<"toInt construct"<<endl; } int operator()(int val) { cout<<"int operator()(int val)"<<endl; return val+10; }};int
2017-08-13 17:57:46 306
原创 配置samba服务--centos7.x
安装 samba rpm包samba.x86_64 : Server and Client software to interoperate with Windows machines查看selinux getenforce临时关闭selinuxsetenforce 0永久关闭selinux ,修改/etc/selinux/config配置文件中SELINUX 为
2017-08-13 17:33:01 154
原创 冒泡排序
#include#includevoid sort(int* arr,int size){ int i=0,j=0,tmp; if(size <=0) return ; for(;i<size;i++) { //for(j=i;j<size;j++) //this sentence is ok for(j=size;j>i;j--) //this sentence is
2017-08-13 16:59:47 153
原创 二级函数指针
#include#includetypedef int (*fp)(int,int);typedef int (**sfp)(int,int);int add (int a,int b){ return a+b;}int main(){ fp fp_m=&add; fp_m(1,2); (*fp_m)(1,2); //函数指针和函数名指向地址相同 //sfp sfp
2017-08-13 16:46:02 368
原创 C和C++的一点小区别
编译时不能确定的值不要放在全局局域初始初始化,否则C编译器会报警告或者错误报错情况#include#includeint add(int a ,int b){ return a+b;}const int c = add(1,2); //编译时不能确定值int main(){ printf("%d\n",c); return 0;}
2017-08-13 16:25:03 399
原创 函数指针
//main.c#include#includeint (*fp)(int,int); //declare a variabletypedef int (*tfp)(int,int); //define a type function pointerint add(int rnum,int lnum){ return rnum+lnum;}int main(){ tfp
2017-08-13 14:35:51 162
原创 自己实现memcpy
#include#include#includevoid memcpy_my(void *dst,const void *src,size_t len){ char *s = src; char *d = dst; assert(len >0); while(len--) { *d++ = *s++; } return ;}int main(){ char
2017-08-13 14:20:21 254
原创 数组和指针的区别
数组和指针的区别//head.h#define ARRLEN 1024int arr[ARRLEN]//main.cpp#include#include"head.h"using namespace std;extern int *arr; //this is error //extern int arr[]; //this is okint main(void){
2017-08-13 14:06:24 159
CRC即循环冗余校验码
2011-03-02
cfree C++ 5.0 轻量级c++编译环境
2010-09-18
vc60 知识库(八皇后问题)
2009-05-21
C++文件操作详解
2012-01-03
软件架构设计相关资料
2011-03-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人