Home Segments Index Top Previous Next

214: Mainline

Note, however, that all member functions have access to member variables declared in the private portion of the class definition. Thus, you can reference and assign values via member functions located in the public part of the class definition:

t.read_radius ( )   <-- Evaluation compiles; 
                        the read_radius function is in the 
                        public part of the class definition 
t.write_radius (6)  <-- Assignment compiles;  
                        the write_radius function is in the 
                        public part of the class definition