- 博客(10)
- 资源 (5)
- 收藏
- 关注
原创 共享段
#pragma data_seg("Shared") extern "C" __declspec(dllexport) char g_buf[1024] = {0}注意: 这里必需将g_buf初始化,否则变量不会放在指定的节,而是放在bss节中 #pragma data_seg() #pragma comment(linker,"/
2013-02-04 12:41:10
429
原创 一个资源打包工具完整代码
#include #include static char g_mem[5 * 1024 * 1024];#define MORE 17#define min(a, b) ((a) < (b) ? (a) : (b))typedef struct _ResMap{ char *pName; int iPos; int iLen; int iOrg
2012-12-26 10:34:04
438
转载 各种字符串hash函数
/// @brief BKDR Hash Function /// @detail 本 算法由于在Brian Kernighan与Dennis Ritchie的《The C Programming Language》一书被展示而得 名,是一种简单快捷的hash算法,也是Java目前采用的字符串的Hash算法(累乘因子为31)。 size_t BKDRHash(const char
2012-12-18 09:55:51
316
转载 LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup 问题的解决
Welcome to my blog! vc中error LNK2001:unresolved external symbol _WinMain@16的解决方法 一,问题描述error LNK2001: unresolved external symbol _WinMain@16debug/main.exe:fatal error LNK 1120:1 unresolved exter
2012-12-13 16:13:40
597
转载 warning C4541: 'dynamic_cast' used on polymorphic type 'class CWnd' with /GR-; unpredictable behavio
是因为没有打开run-time type information 支持就使用'dynamic_cast' 菜单project-setting-c/c++ c++ language - enable run-time type information (RTTI)
2012-12-12 15:41:43
618
转载 __cdecl __stdcall区别
如果通过VC++编写的DLL欲被其他语言编写的程序调用,应将函数的调用方式声明为__stdcall方式,WINAPI都采用这种方式,而C/C++缺省的调用方式却为__cdecl。__stdcall方式与__cdecl对函数名最终生成符号的方式不同。若采用C编译方式(在C++中需将函数声明为extern "C"),__stdcall调用约定在输出函数名前面加下划线,后面加“@”符号和参数的字
2012-11-23 17:13:32
305
原创 C++引用
class Test { int a; int b; int c;}; class Demo { Test &t;};void main(){ cout << sizeof(Demo) << endl; //输出4}C++引用变量占用 4 字节
2012-10-23 11:49:17
226
原创 C/C++编译器变量
__VA_ARGS____LINE____FILE___LINUX_WIN32_WIN32_WCEUNICODE || _UNICODE__cplusplus ___________________Ref___________________________________#pragma (push, n) n = 1, 2, 4, 8,
2012-10-23 11:11:09
720
原创 C++复制
class Hello { int a; Hello() {} Hello(const Hello &a){} Hello & operator = (const Hello &a){} };则 : Hello m; . Hello h = m; // h 只会调用复制构造函数, 不会调用构造函数 ,也不是调用opeator =
2012-10-22 23:21:30
380
plsql pl/sql
2009-03-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人