Adt lab/pointers

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา
This is part of adt lab.

Pointers

In C/C++, there is a special kind of types: pointers. Pointer variables keep locations in the memory. To declare a pointer variable, we use symbol *:

type* variable;

For example, the following code declares p as a pointer to an integer.

  int* p;


Let's start by a simple example.

Pointers and arrays

Other links