how to dereference a pointer code example
Example 1: c++ dereference a pointer
int number;
int value;
int * pNumber;
number = 5;
pNumber = &number;
assert(pNumber); // check before dereferenceing to prevent errors
value = *pNumber // Use * to dereference the pointer
Example 2: dereference pointer c++
value = *pointer // Use * to dereference the pointer