Home Segments Index Top Previous Next

421: Mainline

You can use the class-pointer operator not only to read the value in a member variable, but also to write a value into the memory reserved for a member variable. Thus, the following writes into the radius member variable of a cylinder object:

cptr -> radius = 3.9