public (C++) | Microsoft Learn

When preceding a list of class members, the public keyword specifies that those members are accessible from any function. This applies to all members declared up to the next access specifier or the end of the class. When preceding the name of a base class, the public keyword specifies that the public and protected members of the base class are …

https://learn.microsoft.com/en-us/cpp/cpp/public-cpp?view=msvc-170