RAD Studio
ContentsIndex
PreviousUpNext
C++ Specific Operators

The operators specific to C++ are:

Operator 
Meaning 
::  
Scope access (or resolution) operator  
.*  
Dereference pointers to class members  
->*  
Dereference pointers to pointers to class members  
const_cast  
adds or removes the const or volatile modifier from a type  
delete  
dynamically deallocates memory  
dynamic_cast  
converts a pointer to a desired type  
new  
dynamically allocates memory  
reinterpret_cast  
replaces casts for conversions that are unsafe or implementation dependent  
static_cast  
converts a pointer to a desired type  
typeid  
gets run-time identification of types and expressions  

Use the scope access (or resolution) operator ::(two semicolons) to access a global (or file duration) name even if it is hidden by a local redeclaration of that name. 

Use the .* and ->* operators to dereference pointers to class members and pointers to pointers to class members.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!