You copied the Doc URL to your clipboard.

Scalar type constants

Constants of scalar type can be defined within classes. This is an old form. The modern form uses an initialized static data member.

Errors

A warning is issued if you define a member of constant integral type within a class.

Example

class A
{
    const int size = 10; // must be static const int size = 10;
    int a[size];
};