Dot Operator .

The . (dot) operator is used to access structure or C++ class members using a structure object. The member is specified by a primary expression, followed by a . (dot) operator, followed by a name. For example:

   roster[num].name
   roster[num].name[1]

The primary expression must be an object of type class, struct or union. The name must be a member of that object.

The value of the expression is the value of the selected member. If the primary expression and the name are lvalues, the expression value is also an lvalue.



Unions


Arrow Operator
struct (Structures)