随笔分类 -  C++

摘要:关键字:static_cast,dynamic_cast,fast_dynamic_cast,VS 2015。 OS:Window 10。 C++类之间类型转换有:static_cast、dynamic_cast、reinterpret_cast、和const_cast。 static_cast - 阅读全文
posted @ 2018-04-02 22:32 Ldlchina 阅读(2783) 评论(0) 推荐(2) 编辑
摘要:关键字:C++11,右值引用,rvalue,std::move,VS 2015 OS:Windows 10 右值引用(及其支持的Move语意和完美转发)是C++0x加入的最重大语言特性之一。从实践角度讲,它能够完美解决C++中长久以来为人所诟病的临时对象效率问题。从语言本身讲,它健全了C++中的引用 阅读全文
posted @ 2017-03-24 00:43 Ldlchina 阅读(25836) 评论(0) 推荐(8) 编辑
摘要:关键字:Browser,Application,URL Protocol,Windows,Mac,IE,Chrome,Safari。OS: Windows 7, OS X Yosemite。Windows:1.写一个C++ 应用程序,代码如下:#include #include using name... 阅读全文
posted @ 2016-01-03 11:51 Ldlchina 阅读(8120) 评论(1) 推荐(0) 编辑
摘要:关键字:C++, 数据类型, VS2015。OS:Windows 10。ANSI C/C++基本数据类型:TypeSize数值范围无值型void0 byte无值域布尔型bool1 bytetruefalse有符号短整型short [int] /signed short [int]2 byte-327... 阅读全文
posted @ 2015-09-10 20:42 Ldlchina 阅读(549) 评论(0) 推荐(0) 编辑
摘要:关键字:QT,QComboBox,QLineEdit,QListView,QPushButton,QMenu,QWidgetAction,setStyleSheetOS:Windows 7方法一:QComboBox+QLineEdit+QListView相关问题链接:QComboBox: Can w... 阅读全文
posted @ 2015-07-24 09:41 Ldlchina 阅读(7778) 评论(1) 推荐(0) 编辑
摘要:OS:Windows 7 关键字:VS2015,C++,V-Table,虚表,虚函数。 对C++ 了解的人都应该知道虚函数(Virtual Function)是通过一张虚函数表(Virtual Table)来实现的。简称为V-Table。在这个表中,主是要一个类的虚函数的地址表,这张表解决了继承、覆 阅读全文
posted @ 2015-05-06 21:16 Ldlchina 阅读(1153) 评论(0) 推荐(1) 编辑
摘要:关键字:Python 2.7,VS 2010,swigOS:Win8.1 with update。1.下载swig:http://www.swig.org/download.html2.将swig的路径添加到环境变量Path,例如set path=C:\swigwin-3.0.2。3.用VS创建一个... 阅读全文
posted @ 2014-10-14 21:49 Ldlchina 阅读(9880) 评论(0) 推荐(1) 编辑
摘要:以下是c++模板实例化的一个例子,虽然ObjectList::clear()里面调用的test()函数是没有定义的,但是以下代码能够编译通过,可见ObjectList::clear()未编译;template class ObjectList : public LIST{public: siz... 阅读全文
posted @ 2014-04-09 15:08 Ldlchina 阅读(441) 评论(0) 推荐(0) 编辑
摘要:全局变量(外部变量)的说明之前再冠以static 就构成了静态的全局变量。全局变量本身就是静态存储方式, 静态全局变量当然也是静态存储方式。这两者在存储方式上并无不同。这两者的区别虽在于非静态全局变量的作用域是整个源程序, 当一个源程序由多个源文件组成时,非静态的全局变量在各个源文件中都是有效的。 而静态全局变量则限制了其作用域, 即只在定义该变量的源文件内有效, 在同一源程序的其它源文件中不能使用它。由于静态全局变量的作用域局限于一个源文件内,只能为该源文件内的函数公用, 因此可以避免在其它源文件中引起错误。以下举例说明:1.创建一个名为StaticGlobal的win32 console 阅读全文
posted @ 2014-03-28 14:56 Ldlchina 阅读(4278) 评论(0) 推荐(0) 编辑
摘要:关键字: c++ cast// Cast.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include using namespace std;class Base{public: virtual void func1() = 0; virtual void func2() = 0;};class A{ virtual void func3();};void A::func3(){ cout(pA);//Work fine pBase->func1().. 阅读全文
posted @ 2014-03-18 18:25 Ldlchina 阅读(1538) 评论(0) 推荐(0) 编辑
摘要:OS:Window 71.下载v8 zip:https://github.com/v8/v8,解压zip,重命名v8-master文件夹为v8。2.下载安装svn:http://tortoisesvn.net/downloads.html。安装后确认C:\Program Files\Tortoise... 阅读全文
posted @ 2014-02-17 13:14 Ldlchina 阅读(1364) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示