﻿# V569\. Truncation of constant value\.

The analyzer detected a potential error: a constant value is truncated when it is assigned into a variable\.

Consider this sample:

```cpp
int A[100];
unsigned char N = sizeof(A);
```

The size of the 'A' array \(in Win32/Win64\) is 400 bytes\. The value range for unsigned char is 0\.\.255\. Consequently, the 'N' variable cannot store the size of the 'A' array\.

The V569 warning tells you that you have chosen a wrong type to store this size or that you actually intended to calculate the number of items in the array instead of the array's size\.

If you have chosen a wrong type, you may correct the code this way:

```cpp
size_t N = sizeof(A);
```

If you intended to calculate the number of items in the array, you should rewrite the code this way:

```cpp
unsigned char N = sizeof(A) / sizeof(*A);
```