User Tools

Site Tools


cplusplus:pointers_1_slides

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cplusplus:pointers_1_slides [2021/10/19 19:23] mithatcplusplus:pointers_1_slides [2021/10/19 19:29] (current) – [Example] mithat
Line 165: Line 165:
   * ''nullptr'' and ''NULL'' have an integer value of ''0'', so sometimes programmers use ''0'' or '''\0'''.   * ''nullptr'' and ''NULL'' have an integer value of ''0'', so sometimes programmers use ''0'' or '''\0'''.
  
-===== Pointer operators =====+===== Operators for pointers =====
  
-  *  **address operator** ''&'' (above). +  *  **address operator** ''&'' (already covered). 
-  *  **indirection** or **dereferencing operator** ''*'' (below).+  *  **indirection** or **dereferencing operator** ''*'' (covered next).
  
 ===== Indirection/dereferencing operator ===== ===== Indirection/dereferencing operator =====
Line 221: Line 221:
          << "The address of a is:   " << &a << endl          << "The address of a is:   " << &a << endl
          << "The value of aPtr is:  " << aPtr << endl;          << "The value of aPtr is:  " << aPtr << endl;
-  
     cout << endl;     cout << endl;
    
Line 232: Line 231:
          << "&*aPtr = " << &*aPtr << endl          << "&*aPtr = " << &*aPtr << endl
          << "*&aPtr = " << *&aPtr << endl;          << "*&aPtr = " << *&aPtr << endl;
 +
     return 0;     return 0;
 } }
 </file> </file>
  
cplusplus/pointers_1_slides.txt · Last modified: 2021/10/19 19:29 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki