上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页

2011年10月28日

缩写查阅

摘要: rhs: right hand side. 用于表示等号右边的值。lhs: left hand side. 等号左边的值。 阅读全文

posted @ 2011-10-28 10:51 LateStop 阅读(211) 评论(0) 推荐(0)

VIM配置-逐步改进

摘要: 关于缩进============"将缩进风格设置为C-Styleset cindent "将Shift键的宽度设置为4,即每次手动按下Tab键,将移动四个字符的距离set tabstop=4 "number of spaces to use for indent,即设置缩进的宽度set shiftwidth=4"设置public protected private这些C++声明 置于所在代码块的N个字符后"个人习惯于这些关键字位于行首,即与大括号对齐,不缩进。"要通过设置cindent option来进行设置,如下:set cino= 阅读全文

posted @ 2011-10-28 10:18 LateStop 阅读(282) 评论(0) 推荐(0)

2011年10月27日

#define _FARQ的解释

摘要: 看到这样一段代码:template<class_Ty> inline _Ty _FARQ *_Allocate(_SIZT _Count, _Ty _FARQ *){ //check for integer overflow if(_Count <= 0) _Count = 0; else if(((_SIZE)(-1)/_Count) < sizeof(_Ty)) _THROW_NCEE(std::bad_alloc, NULL); //allocate storage for _Count elements of type _Ty return((_Ty _FARQ 阅读全文

posted @ 2011-10-27 14:59 LateStop 阅读(5685) 评论(0) 推荐(1)

#define与typedef的区别

摘要: 1) #define是预处理指令,在编译预处理时进行简单的替换,不作正确性检查,不关含义是否正确照样带入,只有在编译已被展开的源程序时才会发现可能的错误并报错。例如:#define PI 3.1415926程序中的:area=PI*r*r 会替换为3.1415926*r*r如果你把#define语句中的数字9 写成字母g 预处理也照样带入。2)typedef是在编译时处理的。它在自己的作用域内给一个已经存在的类型一个别名,但是You cannot use the typedef specifier inside a functiondefinition。3)typedef int * int_ 阅读全文

posted @ 2011-10-27 14:43 LateStop 阅读(274) 评论(0) 推荐(0)

2011年10月21日

MFC字符串与时间的相互转换

摘要: 字符串--->时间: COleDateTime temp1; COleDateTime temp2; temp1.ParseDateTime(_T("9999-12-12")); temp2.ParseDateTime(_T("15:05:05")); 时间转换成字符串:COleDateTime beginTime(dlg.m_oleStartTime1.GetYear(), dlg.m_oleStartTime1.GetMonth(), dlg.m_oleStartTime1.GetDay(), dlg.m_oleStartTime2.GetHo 阅读全文

posted @ 2011-10-21 11:32 LateStop 阅读(3833) 评论(0) 推荐(0)

内存对齐的讲解

摘要: 来源自:http://www.cppblog.com/snailcong/archive/2009/03/16/76705.html程序说明一切://环境:vc6 + windows sp2//程序1#include <iostream>using namespace std;struct st1 { char a ; int b ; short c ;};struct st2{ short c ; char a ; int b ;};int main(){ cout<<"sizeof(st1) is "<<sizeof(st1)< 阅读全文

posted @ 2011-10-21 10:50 LateStop 阅读(274) 评论(0) 推荐(0)

2011年10月20日

修改默认构造函数,改变ProPage的ImageList资源

摘要: 背景:BCGControlsPropSheet类是从CBCGPPropertySheet类继承来的,做了一些修改,以满足项目的需求。效果图:但是将左侧的图标(ImageList)写死了,现在需要修改。经查看,该类的构造函数定义为:lass BCGControlsPropSheet : public CBCGPPropertySheet{ DECLARE_DYNAMIC(BCGControlsPropSheet)// Constructionpublic: BCGControlsPropSheet(const CString strTitle=_T(""),CWnd* pPa 阅读全文

posted @ 2011-10-20 18:14 LateStop 阅读(1409) 评论(0) 推荐(0)

2011年10月16日

Fedora15从命令行启动,gvim反应非常慢的问题

摘要: 在~/bash.rc中添加:alias gvim='gvim -f' 添加完后需要Logout一次,变量才能生效。man了一下-f选项,解释如下: -f Foreground. For the GUI version, Vim will not fork and detach from the shell it was started in. On the Amiga, Vim is not restarted to open a new window. This option ... 阅读全文

posted @ 2011-10-16 09:07 LateStop 阅读(947) 评论(0) 推荐(0)

2011年10月8日

error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) 已经在xxxx.lib中定义

摘要: error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) 已经在 LIBCMTD.lib(dbgdel.obj) 中定义答案:修改project-> setting -> General-> Mircosoft Fountationclasses为Use mfc in a shard dll 分析:原来的是“使用windows库”,这样可能多次包含了库。 技巧:查看搜索库的顺序:选择VC菜单Project->Settings->Link页,然后在Project Op 阅读全文

posted @ 2011-10-08 14:14 LateStop 阅读(11527) 评论(0) 推荐(0)

2011年10月7日

快速设置VB中TAB键的顺序

摘要: VB中没有像MFC中设置TAB键顺序的快捷键,因此: 设定各控件的Tab键的顺序可以 a.从想要的顺序的最后一个起,将该项的TabIndex值设定为0 b.将倒数第二个控件,TabIndex设置为0 c.倒数第三个…… d.一直进行到想要顺序的第一个控件 原理:将一个控件的TabIndex设置为0时,原来为0的为变为1,1的变为2…… 都加1.这样设置一遍时,最后被设置的为0,最先设置的为N,其余从0到N 递增。(按照设想顺序) 阅读全文

posted @ 2011-10-07 12:06 LateStop 阅读(6277) 评论(0) 推荐(1)

上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页

导航