Plain old data classes.
So classes are user defined types that contain data and functions.
So and they are the heart and soul of C++.
So the simplest kind of classes are plain all data classes P or DS.
So bodies are simple containers.
Think of them as a sort of heterogeneous array of elements and potentially different types.
So each element is called a member.
So every pod begins with the keyword struct here, followed by the pod name.
So let's create a car struct here, for example.
So next you list the members types and names.
So for example, character, your name.
Year or make year integer year integer tools or.
It wheels.
Here.
And the boolean here.
Let's assign.
Boolean is running.
Yes.
Then.
Here.
As you can see here, a single car struct contains a character array called make and integer year integer
wheels and bool is running boolean.
So you declare that powered variables just like any other variables by type and name.
So you can then access the members of the variable by using the dot operator.
So.
So first, let's firstly declare a car variable here.
Car here.
My Volks and my BMW here and then my BMW that is running with a sign is running to, for example.
True.
Yeah.
My BMW is running, for example, through.
Here and my BMW that make or sort of year is 2001 here this is all BMW and.
Here.
Finally, let's print the message.
Your print is my or.
My BMW.
You're here.
D and.
My BMW that year.
And let's print this.
Here, as you can see here.
Finally, you will print a message and extract a number or extract a year of my car using the this dot
operator here.
So pods have some useful low level features.
So they are C compatible and you can employ machine instructions that are highly efficient to copy or
move them so and they can be efficiently represented in the memory.
So a C++ guarantee is that members feel sequential in memory, although some implementations require
members to build align the long word binary, so which depends on the CP register length.
So as a general rule, you should order members from a lattice to a small list within P or the definitions.