﻿# V528\. Pointer is compared with 'zero' value\. Probably meant: \*ptr \!\= zero\.

This error occurs in two similar cases\.

1\) The analyzer found a potential error: a pointer to bool type is compared to false value\. It is highly probable that the pointer dereferencing operation is missing\. For example:

```cpp
bool *pState;
...
if (pState != false)
...
```

The '\*' operator is missing in this code\. As a result, we compare the pState pointer's value to the null pointer\. This is the correct code:

```cpp
bool *pState;
...
if (*pState != false)
...
```

2\) The analyzer found a potential error: a pointer to the char/wchar\_t type is compared to value '\\0' or L'\\0'\. It is highly probable that the pointer dereferencing operation is missing\. For example:

```cpp
char *cp;
...
if (cp != '\0')
```

This is the correct code:

```cpp
char *cp;
...
if (*cp != '\0')
```