Like I said before structure types work just like built in types and you can even use them with pointers.
So something like this type pointer in column A pointer say.
OK.
And we can even get it from the
pointer.
New book or
we it down here.
And so it works exactly like any other regular Pilton type.
There is one difference though and the question becomes how would you access member variables from the
pointer k.
So let's say we wanted to access the year from the book pointer.
Well here's how you do it one way you do it is remember we use the dereference operator the star K and
I'm putting these into parentheses because we have to dereference just the book pointer and then you'd
press dot K and then you could access your K.
You can do this.
But there's an easier way because this is a bit cumbersome to do every time you have to kind of put
it in parentheses and have that dereference and use that dot operator.
It's all kind of messy.
OK.
So instead of what you can do is do this.
So book winter in have this arrow and then access the year
k.
So these two are actually equivalent.
These are the same thing.
OK.
And so what this is doing is really two things.
It's referencing the pointer and also accessing the member variable of the structure all in the same
or all in one kind of little piece of syntax.
This this erro so you can use either version but I tend to prefer the arrow because oftentimes I don't
want to write this right.
This is kind of ugly.
So talk about some different ways you can make it easier to find types in the next lecture.