07 2014 档案

设计模式之工厂模式 练习
摘要:设计模式中 最基本的工厂模式感觉就是根据输入的类型决定选择何种类与进行何种操作。跟面向过程中输入1则执行func1();输入2则执行func2()基本一致的想法#include using namespace std;enum eShoeType{ leather = 0,rubber};class... 阅读全文

posted @ 2014-07-28 11:29 itdef 阅读(623) 评论(1) 推荐(0)

记录下 UTF6 GBK 转换函数
摘要:int GBK2UTF8(char *szGbk,char *szUtf8,int Len) { // 先将多字节GBK(CP_ACP或ANSI)转换成宽字符UTF-16 // 得到转换后,所需要的内存字符数 int n = MultiByteToWideChar(CP_ACP,0,s... 阅读全文

posted @ 2014-07-06 13:23 itdef 阅读(305) 评论(0) 推荐(0)

导航