; rather than .
This commit is contained in:
@@ -124,8 +124,9 @@ will assume NULL and nullptr are equivalent.
|
|||||||
- Comparing a pointer to NULL is very useful. It can be used to indicate whether or not a pointer variable is
|
- Comparing a pointer to NULL is very useful. It can be used to indicate whether or not a pointer variable is
|
||||||
pointing at a useable memory location. For example,
|
pointing at a useable memory location. For example,
|
||||||
```cpp
|
```cpp
|
||||||
if ( p != NULL )
|
if ( p != NULL ){
|
||||||
cout << *p << endl.
|
cout << *p << endl;
|
||||||
|
}
|
||||||
```
|
```
|
||||||
tests to see if p is pointing somewhere that appears to be useful before accessing and printing the value stored
|
tests to see if p is pointing somewhere that appears to be useful before accessing and printing the value stored
|
||||||
at that location.
|
at that location.
|
||||||
|
|||||||
Reference in New Issue
Block a user