Edit

Share via


Warning C26482

Only index into arrays using constant expressions.

See also

C++ Core Guidelines Bounds.2

Example

int getSomeIndex();

void function(int* p, int count)
{
    p[getSomeIndex()] = 0; // C26482, Only index into arrays using constant expressions
}