一、进程唯一实例化 实现 有哪些方法
1进程匹配
2进程互斥
CreateMutex(Assembly.GetEntryAssembly().FullName);
3运行标志
4共享dll设置标志
http://blog.youkuaiyun.com/hczhiyue/article/details/6785773
二、dll 共享数据
http://blog.youkuaiyun.com/hczhiyue/article/details/6785773
三、win32创建模态与非模态对话框
四、dll 传 string问题
dll 与 exe 分别使用自己的stl库进行链接的,在dll内部进行string赋值会重新分配内存空间,结果在exe中释放出错。
http://gcclife.blog.163.com/blog/static/1816971332011680818188/
http://blog.youkuaiyun.com/blz_wowar/article/details/2176536
五、进程间同步有哪些方法
临界区、互斥变量、事件、信号量
六、调试方法
断点、条件变量、远程调试
七、子类构造与析构父类构造析构顺序
父类先构造、子类先析构,需要虚析构函数
八、双缓冲原理
memdc
九、哈希表原理
分类查找
十、强类型
c++强类型,大多数据结构不能隐式转换
十一、传值与传指针的区别
十二、编译器默认产生的类函数
构造、析构、赋值
class Empty
{
public:
Empty();
Empty(const Empty&);
~Empty();
Empty& operator=(const Empty& rhs);
Empty* operator&();
const Empty* operator&() const;
};
十三、com接口都需要继承哪个类
interface IUnknown
{
virtual HRESULT-_ _stdcall QueryInterface(const IID& iid,void **ppv)=0;
virtual ULONG_ _stdcall AddRef( )=0;
virtual ULONG_ _Release( )=0;
};
所有的COM都要继承IUnknown。
十四、引用计数
#include<iostream>
using namespace std;
class refcount
{
public :
refcount(int* _p) : p(_p),count(1) {}
refcount(const refcount & rc)//这里由于后创建的对象先析构,所以不会有问题
{
this->p = rc.p;
this->count = rc.count + 1;
}
refcount & operator=(const refcount & rc)
{
if(this->p != rc.p)
{
--(this->count);
this->count = rc.count + 1;
this->p = rc.p;
}
return *this;
}
~refcount()
{
if(!(--count))
delete []p;
}
private :
int count;//内存区域的引用次数
//size psize;//内存区域的长度
int* p;//内存首指针
};
class A
{
public:
A():p(new int[1]),rc(p) {}
private:
int *p;
refcount rc;
};
int main()
{
A a;
A b(a);
A c(a);
A d(c);
return 0;
}
十五、圆形窗体实现
在你窗口的OnCreate或者对话款的OnInitDlg函数加入这些。
CRgn rgn;
rgn.CreateEllipticRgn(0, 0, 100, 100); //具体数自己定
SetWindowRgn(&rgn, TRUE);
rgn.DeleteObject();
十六、map底层实现
平衡树
十七、质数即是素数
十八、最成功的地方
十九、有哪些特强
二十、回调函数
1进程匹配
2进程互斥
CreateMutex(Assembly.GetEntryAssembly().FullName);
3运行标志
4共享dll设置标志
http://blog.youkuaiyun.com/hczhiyue/article/details/6785773
二、dll 共享数据
http://blog.youkuaiyun.com/hczhiyue/article/details/6785773
三、win32创建模态与非模态对话框
四、dll 传 string问题
dll 与 exe 分别使用自己的stl库进行链接的,在dll内部进行string赋值会重新分配内存空间,结果在exe中释放出错。
http://gcclife.blog.163.com/blog/static/1816971332011680818188/
http://blog.youkuaiyun.com/blz_wowar/article/details/2176536
五、进程间同步有哪些方法
临界区、互斥变量、事件、信号量
六、调试方法
断点、条件变量、远程调试
七、子类构造与析构父类构造析构顺序
父类先构造、子类先析构,需要虚析构函数
八、双缓冲原理
memdc
九、哈希表原理
分类查找
十、强类型
c++强类型,大多数据结构不能隐式转换
十一、传值与传指针的区别
十二、编译器默认产生的类函数
构造、析构、赋值
class Empty
{
public:
Empty();
Empty(const Empty&);
~Empty();
Empty& operator=(const Empty& rhs);
Empty* operator&();
const Empty* operator&() const;
};
十三、com接口都需要继承哪个类
interface IUnknown
{
virtual HRESULT-_ _stdcall QueryInterface(const IID& iid,void **ppv)=0;
virtual ULONG_ _stdcall AddRef( )=0;
virtual ULONG_ _Release( )=0;
};
所有的COM都要继承IUnknown。
十四、引用计数
#include<iostream>
using namespace std;
class refcount
{
public :
refcount(int* _p) : p(_p),count(1) {}
refcount(const refcount & rc)//这里由于后创建的对象先析构,所以不会有问题
{
this->p = rc.p;
this->count = rc.count + 1;
}
refcount & operator=(const refcount & rc)
{
if(this->p != rc.p)
{
--(this->count);
this->count = rc.count + 1;
this->p = rc.p;
}
return *this;
}
~refcount()
{
if(!(--count))
delete []p;
}
private :
int count;//内存区域的引用次数
//size psize;//内存区域的长度
int* p;//内存首指针
};
class A
{
public:
A():p(new int[1]),rc(p) {}
private:
int *p;
refcount rc;
};
int main()
{
A a;
A b(a);
A c(a);
A d(c);
return 0;
}
十五、圆形窗体实现
在你窗口的OnCreate或者对话款的OnInitDlg函数加入这些。
CRgn rgn;
rgn.CreateEllipticRgn(0, 0, 100, 100); //具体数自己定
SetWindowRgn(&rgn, TRUE);
rgn.DeleteObject();
十六、map底层实现
平衡树
十七、质数即是素数
十八、最成功的地方
十九、有哪些特强
二十、回调函数
二十一、单链表实现
二十二、数据结构大小问题
二十三、句柄