现在这一类型的值可以通过内建的函数new来分配,这将返回一个指针,指向一块内存单元,其所占内存槽初始化为零。
Values of this type can now be allocated using the built-in function new, which returns a pointer to the value in memory with all slots initialized to the zero value.
在这个方案中,对象由指针代表,而GtkWidget是GTK +层次结构中的基本类型——叫做类,其他类都从它派生而来。
In this scheme, objects are represented by Pointers, and GtkWidget is the basic type — called a class — in the GTK + hierarchy from which all other classes are derived.
本身支持64位类型的系统通常都采用一种称为“LP64”的模型,其中long类型和指针大小都是64位的。
Systems with native 64-bit types often went to a model called "LP64," where the long and pointer sizes were both 64 bit.
当具有基类的引用或指针,但需要执行不是基类组成部分的派生类操作的时候,需要动态的强制类型转换。
Dynamic casts are needed when we have a reference or pointer to a base class but need to perform operations from the derived class that are not part of the base class.
通过运行时类型识别(RTTI),程序能够使用基类的指针或引用来检索这些指针或引用所指对象的实际派生类型。
Run-time Type Identification (RTTI) allows programs that use pointers or references to base classes to retrieve the actual derived types of the objects to which these pointers or references refer.
如果基类成员与派生类成员接受的实参不同,就没有办法通过基类类型的引用或指针调用派生类函数。
If the base member took different arguments than the derived-class member, there would be no way to call the derived function from a reference or pointer to the base type.
连续声明同一类型的多个指针有两种通用的声明风格。
There are two common styles for declaring multiple pointers of the same type. One style requires that a declaration introduce only a single name.
只有算术,枚举,指针,指向成员和允许类的类型参数。
Only arithmetic, enumeration, pointer, pointer to member, and class type arguments are allowed.
结构是值类型,类是引用类型-类始终提供至少一级内存间接寻址(指向某一值的指针)。
Structures are value types and classes are reference types - classes always provide at least one level of memory indirection (a pointer to a value).
讨论值类型语义的更改,包括继承的虚方法、类默认构造函数、内部指针和钉住指针。
Discusses changes to value type semantics, including inherited virtual methods, class default constructors, interior Pointers, and pinning Pointers.
即使不使用本机类型,本机类、结构、指针或数组的声明也将阻止编译。
Even if it isn't used, the declaration of native classes, structures, Pointers, or arrays will prevent compilation.
如果该指针是一个指向派生类对象的基类类型指针,则那个对象将被分割( 第15.3.1节),只抛出基类部分。
If that pointer is a base-class type pointer that points to a derived-type object, then that object is sliced down ( Section 15.3.1, p. 577); only the base-class part is thrown.
新类代表一种新的数据类型,这样想很方便,所以可以定义类的对象和指向这一类的对象的指针。
A class name represents a new data type. We can use it to define objects of our class type in the same way we use the built-in types to define those objects.
新类代表一种新的数据类型,这样想很方便,所以可以定义类的对象和指向这一类的对象的指针。
A class name represents a new data type. We can use it to define objects of our class type in the same way we use the built-in types to define those objects.
应用推荐