c中指针_C ++中指针的简单示例

c中指针

We have already discussed it in C programming pointers, here I am writing a simple example in C++ programming language to declare, initialize and access the pointers.

我们已经在C编程指针中讨论了它,这里我在用C ++编程语言编写一个简单的示例来声明,初始化和访问指针。

Pointers are the variables (a type of special), which stores the address of another variables.

指针是变量(一种特殊的变量),它存储另一个变量的地址。

Pointers can store address of other normal variable as well as store the address of another pointer variable. The pointer which stores the address of another pointer variable is known as double pointer or pointer to pointer.

指针可以存储其他普通变量的地址,也可以存储另一个指针变量的地址。 存储另一个指针变量的地址的指针称为双指针指针指针

Let's understand both cases through examples...

让我们通过示例来了解这两种情况...

示例1)声明一个指针,该指针将存储普通变量的地址 (Example 1) Declare a pointer, that will store the address of a normal varia

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值