Bagikan melalui


Peringatan C26483

Nilai 'value' berada di luar batas (0, 'bound') variabel 'variabel'. Hanya indeks ke dalam array menggunakan ekspresi konstanta yang berada dalam batas array (bounds.2).

Lihat juga

C++ Batas Pedoman Inti.2

Contoh

void function()
{
    std::array<int, 3> arr1 { 1, 2, 3 };
    arr1[3] = 4; // C26483, 3 is outside the bounds of the array

    int arr2[] { 1, 2, 3 };
    arr2[3] = 4; // C26483, 3 is outside the bounds of the array
}