会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
上海—Michael
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
10
11
···
13
下一页
2014年4月26日
extern "C" 的作用
摘要: 被extern "C"修饰的变量和函数是按照C语言方式编译和连接的;未加extern“C”声明时的编译方式。首先看看C++中对类似C的函数是怎样编译的。作为一种面向对象的语言,C++支持函数重载,而过程式语言C则不支持。函数被C++编译后在符号库中的名字与C语言的不同。例如,假设某个函数的原型为:v...
阅读全文
posted @ 2014-04-26 10:43 上海—Michael
阅读(164)
评论(0)
推荐(0)
编辑
2014年4月25日
DLL 演示
摘要: 编写DLL时的函数与一般的函数方法基本一样。但要对库中的函数进行必要的声明,以说明哪些函数是可以导出的,哪些函数是不可以导出的。把DLL中的函数声明为导出函数的方法有两种:一是使用关键字_declspec(dllexport)来声明。二是在.def文件中声明。一、使用关键字_declspec(dll...
阅读全文
posted @ 2014-04-25 17:29 上海—Michael
阅读(248)
评论(0)
推荐(0)
编辑
C++中L和_T()之区别
摘要: 字符串前面加L表示该字符串是Unicode字符串。_T是一个宏,如果项目使用了Unicode字符集(定义了UNICODE宏),则自动在字符串前面加上L,否则字符串不变。因此,Visual C++里边定义字符串的时候,用_T来保证兼容性。VC支持ascii和unicode两种字符类型,用_T可以保证从...
阅读全文
posted @ 2014-04-25 16:48 上海—Michael
阅读(3759)
评论(0)
推荐(0)
编辑
2014年4月23日
VMware:Configuration file was created by a VMware product with more features than this version
摘要: Few days ago,I opened the Genesys demo VM by VMware Server 1.0.4 and got an error like this: "Configuration file was created by a VMware product with...
阅读全文
posted @ 2014-04-23 09:38 上海—Michael
阅读(946)
评论(0)
推荐(0)
编辑
2014年4月21日
使用内存映射来对文件排序
摘要: #include"stdafx.h"#include #define DATALEN 56#define KEY_SIZE 8typedef struct _RECORD { TCHAR key[KEY_SIZE]; TCHAR data[DATALEN];} RECORD;#define RECS...
阅读全文
posted @ 2014-04-21 17:56 上海—Michael
阅读(366)
评论(0)
推荐(0)
编辑
2014年4月17日
平衡二叉树的插入删除操作
摘要: 平衡二叉树(Balanced binary tree)是由阿德尔森-维尔斯和兰迪斯(Adelson-Velskii and Landis)于1962年首先提出的,所以又称为AVL树。定义:平衡二叉树或为空树,或为如下性质的二叉排序树:(1)左右子树深度之差的绝对值不超过1;(2)左右子树仍然为平衡二...
阅读全文
posted @ 2014-04-17 16:58 上海—Michael
阅读(7014)
评论(3)
推荐(0)
编辑
2014年4月15日
volatile关键字的使用
摘要: volatile变量直接在CPU和内存之间交换,不通过一级、二级缓存。考虑下面的代码:代码:123456789101112131415161718class Gadget{public:void Wait() {while (!flag_){Sleep(1000); // sleeps for 10...
阅读全文
posted @ 2014-04-15 15:47 上海—Michael
阅读(212)
评论(0)
推荐(0)
编辑
HeapCreate深入研究
摘要: 本机:win7(x86),4G内存#include"stdafx.h"#include#include#include#includeusing namespace std;HANDLE hHeap;int _tmain(int argc, _TCHAR* argv[]){ SYSTEM_INFO ...
阅读全文
posted @ 2014-04-15 13:23 上海—Michael
阅读(996)
评论(0)
推荐(0)
编辑
GetSystemInfo
摘要: #include #include #include using namespace std; int main() { SYSTEM_INFO systemInfo; GetSystemInfo(&systemInfo); cout <<setw(20) << "处理器掩...
阅读全文
posted @ 2014-04-15 12:37 上海—Michael
阅读(344)
评论(0)
推荐(0)
编辑
2014年4月14日
语法错误: 标识符“acosf”
摘要: 1>e:\vs2010\vc\include\cmath(19):errorC2061:语法错误:标识符“acosf”1>e:\vs2010\vc\include\cmath(19):errorC2059:语法错误:“;”1>e:\vs2010\vc\include\cmath(19):errorC...
阅读全文
posted @ 2014-04-14 11:05 上海—Michael
阅读(1322)
评论(0)
推荐(0)
编辑
上一页
1
···
3
4
5
6
7
8
9
10
11
···
13
下一页