自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 资源 (4)
  • 收藏
  • 关注

原创 C++派生类构造函数调用顺序

#include using namespace std;class A{public:     A()     {          a=0;          cout     }     A(int i)     {          a=i;          cout     }     ~A()     {

2012-08-28 16:12:00 474

原创 友元函数实例

#include using  namespace std;class Cla{public:    Cla(double d = 0)    { dat = d;    }    friend void inDat(Cla &d)    { cin >> d.dat;    }    friend Cla addDat(Cla d1,Cla d

2012-08-27 17:55:35 2281

原创 静态成员函数生命期

块级别的局部静态对象其作用域局部于块,但其生命周期与全局对象相同 ,只是在第一次遇见时分配空间并初始化。具体情况见实例:#include #include using namespace std;int count = 0 ;class myclass{    char cc;public:    myclass(char ch)    { ++co

2012-08-24 10:52:50 621

原创 函数指针实例

#include #include using namespace std;double func1(double x){    cout     return (1/x);}double func2(double x){    cout     return (x*x);}double func3(double x){    cout

2012-08-23 16:34:41 413

原创 int* p 与 int** p的区别

#include using namespace std;int func(int i1,int* pi21,int* &pi22,int &ri3,char* str){    cout     cout << "i1,*pi21,*pi22,ri3,str = " << i1 << " " << *pi21 << " " << *pi22 << " " << ri3

2012-08-23 15:04:29 795

原创 new delete的简单用法

#include using namespace std;int  main(){    struct str    { int a[10000];    };    str* temp;    int count = 0;    cout     for(int i = 0;i     { count++; temp = new str[1

2012-08-23 10:32:26 425

原创 简单排序算法

#include #include void Sort(int A[],int n){    int i = 1;    int ind;    int temp = 0 ;    for(i = 1;i     { ind = i; temp = A[i]; while(ind > 0 && temp  {     A[ind] = A[ind

2012-08-22 10:46:45 382

原创 shell脚本读取配置文件

#!/bin/shpack_install(){  echo "hello"  if [ $3 = "\"y\"" ];then  salt "$2" cmd.run "apt-get install --force-yes -y $1"  1>/dev/null 2>&1  fi}pack="elasticsearch"var=$(awk -F '=' '/\

2012-08-21 17:23:18 1194

转载 waitpid实例

#include #include #include #include #include int main(){        pid_t childpid,a;    int status;    childpid = fork();    printf("childpid = %d\n",childpid);    if ( childpid

2012-08-21 10:23:14 526

转载 线程同步

生产者而消费者的同步问题: #include #include #define BUFFER_SIZE 16 // 缓冲区数量struct prodcons{// 缓冲区相关数据结构    int buffer[BUFFER_SIZE]; /* 实际数据存放的数组*/    pthread_mutex_t lock; /* 互斥体lock 用于对缓冲区的互斥操作

2012-08-20 15:51:32 377

ExtJS基础入门

适合初学者掌握EXT的基础教程,最近才看完,感觉收获很大,所以想和大家一起分享……

2011-11-13

自绘BUTTON

本段代码主要是为初学MFC者设计,通俗易懂的例子包您一学就会……

2011-10-08

MFC自绘按钮的实现

此段代码主要实现了按钮的自绘及背景的修改,适合初学者参考……

2011-09-20

MFC 简易计算器

此段代码实现了简单计算器的功能,适合初学者参考……

2011-09-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除