摘要: 以下代码段在VS2008编译可以通过,只是会提示不安全; std::vector fileData ="asdfsfsfsfsdf";//随便打的 //文件数据大小 int size = fileData.size(); //字节数组 char* data = new char[size + 1]; //把二进制数据复制到数组 std::copy(fileData.begin(), fil... 阅读全文
posted @ 2014-12-03 11:14 A.Kun 阅读(1047) 评论(0) 推荐(0) 编辑
摘要: 转 http://www.zedwood.com/article/cpp-md5-function MD5 is no longer considered cryptographically safe for digital signatures, however, because the md5 hash function is still useful for other purpo... 阅读全文
posted @ 2014-11-27 09:24 A.Kun 阅读(1808) 评论(0) 推荐(0) 编辑
摘要: 可直接编译(设置成:使用多字节字符集)转来的,代码:/*http://www.experts-exchange.com/Programming/Editors_IDEs/Q_24506125.html*/#include #include #include #include #include #in... 阅读全文
posted @ 2014-11-25 17:17 A.Kun 阅读(4976) 评论(1) 推荐(0) 编辑
摘要: 使用ShellExecuteA调用exe文件时,指定工作目录需要注意函数原型为:HINSTANCE ShellExecuteA( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirec... 阅读全文
posted @ 2014-11-21 16:50 A.Kun 阅读(918) 评论(0) 推荐(0) 编辑
摘要: 一,问题描述 MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用 Debug\jk.exe : fatal error LNK1120: 1 个无法解析的外部命令 error LNK2001: unresolved external symbol _... 阅读全文
posted @ 2014-11-20 16:18 A.Kun 阅读(5370) 评论(0) 推荐(0) 编辑
摘要: C++ TCHAR* 与char* 互转 在MSDN中有这么一段: Note: The ANSI code pages can be different on different computers, or can be changed for a single computer, leading to data corruption. For the most consistent resu... 阅读全文
posted @ 2014-11-19 10:11 A.Kun 阅读(9770) 评论(0) 推荐(0) 编辑
摘要: 1.引言 C++语言的创建初衷是“a better C”,但是这并不意味着C++中类似C语言的全局变量和函数所采用的编译和连接方式与C语言完全相同。作为一种欲与C兼容的语言, C++保留了一部分过程式语言的特点(被世人称为“不彻底地面向对象”),因而它可以定义不属于任何类的全局变量和函数。但是,C++毕竟是一种面向对象的程序设计语言 ,为了支持函数的重载,C++对全局函数的处理方式与C有明显... 阅读全文
posted @ 2014-11-18 14:37 A.Kun 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 通过文件二进制数据 与密钥进行异或处理,可加密文件 #ifndef __ENCRYPT__HEAD__ #define __ENCRYPT__HEAD__ #include #include namespace Crypto { /* 加密文件数据: 参数: filePath 需要加密的文件路径 key... 阅读全文
posted @ 2014-11-14 11:51 A.Kun 阅读(2174) 评论(0) 推荐(0) 编辑
摘要: 系统win7问题始于安装了同事的字体,启动Flash CS6时界面上显示开始初始化字体。。。然后 就自动退出了尝试过进入pe系统删除字体,可是删除不了网上搜索找到了这一个删除字体的工具FontFrenzy,将安装的字体全部删除,然后再从其他win7系统里拷贝fonts字体文件安装重启电脑,正常启动Flash cs6, Y 阅读全文
posted @ 2014-03-26 11:27 A.Kun 阅读(1202) 评论(0) 推荐(0) 编辑
摘要: 在Windows环境下构建Lua一:准备软件 1.C-compiler(TDM GCC) http://tdm-gcc.tdragon.net/download 2.Lua源代码 http://www.lua.org/download.html 3.用2345好解软件更方便。解压软件7-zip,这里不使用官方版本 http://portableapps.com/apps/utilities/7-zip_portable 二:安装软件gcc安装完成gcc后的目录结构如下2.安装解压软件 7-Zip (用好压吧,反正这一步就是把lua的目录解压出来)3.创建一个cmd文件,如build.cmd.. 阅读全文
posted @ 2014-03-18 16:25 A.Kun 阅读(2310) 评论(0) 推荐(0) 编辑