PUBLIC

PUBLIC is the default access level and requires no special syntax during declaration. In the previous example, all the data fields of the class Circle, such as Radius and Area, have PUBLIC access. A data field of type public is unrestricted, and may be read and modified by any outside function.

Note that a STRUCTURE definition can be thought of as a class definition where all the data fields have public access, and in which there are no member functions.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.