对C++中指针的深入研究

进修社 人气:3.19W
毕业论文


C++中指针的深入研究<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

王根义

(陕西职业技术学院计算机系,陕西西安 710100

  要:本文对C++各种类型的指针进行了深刻全面地讨论,把各种指针的常量,变量的声明、赋值和访问都11列出,这对利用指针开发大型软件程序员来说无疑是1个非常有力的工具。本文还揭示了指针变量与数组名的内在关系,以及类的静态数据指针与非静态数据指针的根本区别。

关键词:指针类型、指针常量、指针变量、数组名

文献标识码A   【文章编号1728-2462(2008)06-0070-02

 

AbstractAll kinds of pointers in C++ are thoroughly and deeply constant quantity,variables,the form of endowing with value and access to data are listed like a is undoubtedly a useful tool to a programmer who develops big author bring to light the relationship between the pointer variables and the name of number also reveals the essential distinction between a static pointer and non-static pointer.

Keywords:pointer type data,pointer constant quantity,pointer variable,a number group’s name

 

C++中的`“指针”实质上是指针类型的数据,所以指针既有常量,也有变量。但是人们往往只是简单的说“指针”,没有带“常量”或“变量”2字。那么,该“指针”到底是指常量呢还是指变量呢?这个问题要根据它所属的那个整句才能回答。C++中的指针按照它所指向的对象可以划分为变量指针、数组指针、函数指针、对象指针、类的成员数据指针和类的成员函数指针。

1、变量指针

type代表任意1种基本类型说明符,X是该类型的变量,则:

1

对C++中指针的深入研究

[1]           ...