随笔分类 -  c/c++

摘要:使用mfc class Wizard添加映射时,出现以下提示Error HRESULT E_FAIL has been returned from a call to a COM component. 解决方法:退出vs,然后删除项目下面所有的.sdf,.suo文件,然后重新开启项目,再吏用class Wizard ,此时比较慢,等待一下就可以了 阅读全文
posted @ 2012-05-21 15:46 网络小虫 阅读(342) 评论(0) 推荐(0)
摘要:#include <iostream> #import "C:\Program Files\Common Files\Microsoft Shared\office11\mso.dll" rename("DocumentProperties", "DocumentPropertiesXL") rename("RGB", "RBGXL") #import "C:\Program Files\Comm... 阅读全文
posted @ 2011-10-18 13:18 网络小虫 阅读(1067) 评论(0) 推荐(0)
摘要:1.下载安装 a) Python 2.7.0 安装到E:\Python27后,path环境变量加上 ;E:\Python27;E:\Python27\Scripts b)Scons-2.0.1.win32.exe http://sourceforge.net/projects/scons/files/scons/2.0.1/scons-2.0.1.win32.exe/download 安装时,会... 阅读全文
posted @ 2011-07-11 22:03 网络小虫 阅读(2789) 评论(0) 推荐(0)
摘要:原地址:http://blog.csdn.net/allenky/archive/2008/10/16/3087444.aspx 在改写一个软件的自动更新程序时遇到一个问题 exe与dll在载入的时候是不能覆盖与删除的... 自动更新的时候,如何把用http/ftp下载下来的新版本替换旧版本 第一种是最老土的办法: 假设a.exe要更新自己, down下来为a.exe.upd, 关闭自己,并exe... 阅读全文
posted @ 2011-05-16 23:14 网络小虫 阅读(1083) 评论(0) 推荐(0)
摘要:原地址:http://www.cppreference.com/operator_precedence.html C++ Operator Precedence The operators at the top of this list are evaluated first. Precedence Operator Description Example Associativity 1... 阅读全文
posted @ 2010-12-30 17:35 网络小虫 阅读(276) 评论(0) 推荐(0)
摘要:原地址: http://blog.csdn.net/buaaxiao/archive/2010/08/15/5813230.aspx(注,本文只做排版修改) mutalbe的中文意思是“可变的,易变的”,跟constant(即C++中的const)是反义词。   在C++中,mutable也是为了突破const的限制而设置的。被mutable修饰的变量,将永远处于可变的状态,即使在一个const函... 阅读全文
posted @ 2010-12-26 14:32 网络小虫 阅读(361) 评论(0) 推荐(0)
摘要:有些时候在只有一个dll的情况下,如果需要隐式链接的话,就需要为该dll产生一个导入库.注意导入库是不能跨编译器使用的,在mingw中导入库需要以.a结尾,而vs则以.lib以下的方法是在Msys产生mingw及vs 的导入库 ,打开MSys工具首先生成dll库的def文件 1.mingw $ pexports filename.dll filename.def 2.visual studio C:\ dumpbin /EXPORTS filename.dll filename.def pexports的下载地址是:http://www.emmestech.com/software/ 阅读全文
posted @ 2010-12-10 10:23 网络小虫 阅读(628) 评论(0) 推荐(1)
摘要:解决:Cannot open include file: 'inttypes.h' 更新ffmpeg之后,有时编译应用ffmpeg库的工程会发现提示: Cannot open include file: 'inttypes.h': No such file or directory 的出错信息,可通过如下方法解决:1、找到include目录中的ffmpeg\common.h2、在“#define ... 阅读全文
posted @ 2010-12-03 00:20 网络小虫 阅读(2412) 评论(0) 推荐(0)
摘要:写了一个最简单的动态链接库程序,使用g++命令行编译。怕以后忘记,就把它记到blog中。动态库导出头文件:/** * file: dll.h * Powered by JGood 2009-09-22 */ #ifndef __dll_h__#define __dll_h__ #ifdef __MY_DLL_LIB__ #define DLL_EXPORT extern "C" __decls... 阅读全文
posted @ 2010-12-02 17:48 网络小虫 阅读(3193) 评论(0) 推荐(0)
摘要://dllsample.h//dllsample.cpp //comile.bat@call "E:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"@cl dllSample.cpp /link /out:dllSample.dll /dll /Entry:Entry /OPT:NOWIN98 /machine:x86echo =... 阅读全文
posted @ 2010-09-17 23:37 网络小虫 阅读(249) 评论(0) 推荐(0)
摘要:在Linux系统里,/usr/include/linux/if_pppox.h里面有这样一个结构: struct pppoe_tag { __u16 tag_type; __u16 tag_len; char tag_data[0]; } __attribute ((packed)); 最后一个成员为可变长的数组,对于TLV(Type-Length-Value)形式的结构,或者其他需要变长... 阅读全文
posted @ 2010-08-29 15:42 网络小虫 阅读(873) 评论(0) 推荐(0)
摘要:问题描述:在计算机中,由于处理器位宽限制,只能处理有限精度的十进制整数加减法,比如在32位宽处理器计算机中,参与运算的操作数和结果必须在-231~231-1之间。如果需要进行更大范围的十进制整数加法,需要使用特殊的方式实现,比如使用字符串保存操作数和结果,采取逐位运算的方式。如下:9876543210 + 1234567890 =?让字符串 num1 = "9876543210",字符串 num2... 阅读全文
posted @ 2010-08-24 21:11 网络小虫 阅读(957) 评论(1) 推荐(0)