Pointer Operator
The following member access syntax forms are equivalent:
(*ptr).cpu ? ptr -> cpu
with:
E_Brain computer1, *ptr;
ptr = &computer1;
we can also say
ptr -> ram_size = 640;
strcpy(ptr->brand, "IBM");
ptr -> cpu = "pentium";
Previous slide
Next slide
Back to first slide
View graphic version