2011年3月7日
摘要: C++ 有许多features( abstract class, virtual deconstuctor,RTTI, virtual inheritance)完全用C 去模拟一个C++ 其实是很难。 下面列一个表,如何用C 去模拟C++的一些主要功能:Feature in C++Implemented in CClassstructure data member data member static_ data member global member and link membor function function point constructor function global ac 阅读全文
posted @ 2011-03-07 20:46 RocZhang 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 记录一下自己学习笔记ATL Under the Hood - Part 1http://www.codeproject.com/KB/atl/atl_underthehood_.aspx 告诉对象的类存模型,包括继承关系的类之间的内存模型View Code 1 #include <iostream> 2 using namespace std; 3 4 class Base { 5 public: 6 Base() {} 7 virtual void f1() = 0; 8 virtual void f2() = 0; 9 int bi;10 };11 12 class Base 阅读全文
posted @ 2011-03-07 20:03 RocZhang 阅读(556) 评论(0) 推荐(0) 编辑
摘要: 写这篇博文的目的是,记录学习过程。对于问题要较真,在解决这个问题中会学到很多,远远超过自己期望,锻炼思维,享受这个过程。问题: Static_cast 与 Dynamic_cast的区别来自书本上的解释: 用 static_cast<type-id > ( expression )1. static_cast(expression) The static_cast<>() is used to cast between the integer types. 'e.g.' char->long, int->short etc. 用来数值之间的转 阅读全文
posted @ 2011-03-07 00:47 RocZhang 阅读(13115) 评论(2) 推荐(3) 编辑