Содержание
- 2. pointers Every variable is a memory location and every memory location has its address defined. A
- 3. pointers Some valid pointer declarations: int *ip; // pointer to an integer double *dp; // pointer
- 4. pointers: reference operator (&) To know where the data is stored, C++ has an & operator.
- 5. pointers: dereference operator (*) To get the value stored in the memory address, we use the
- 6. pointers: dereference operator (*) To get the value stored in the memory address, we use the
- 7. pointers and arrays Let’s see the example: int A[4]; int *ptr; Suppose, we need to hold
- 8. pointers and arrays So, if we write ptr=&a[2]; then ptr will store the address of third
- 10. Скачать презентацию