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 plus plus.
So the simplest kind of classes are plain old data classes.
Pods.
So pods are simple containers.
Think of them as a sort of heterogenous 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 pods name.
So let's create a car struct here for example.
So next you list the members types and names.
So for example character here name.
Here or make here.
Integer here.
Integer does.
Or.
Wheels.
Here.
And the boolean here, let's assign.
Boolean is running.
Here then.
Here.
As you can see here, a single car struct contains a character array called make an integer here, integer
wheels and bool is running boolean.
So you declare the 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 first declare a car variable here.
Car here.
My my BMW here and then my BMW that is running.
Let's assign is running to um.
For example.
True.
Yeah.
My BMW is running for example.
True.
Here and my BMW cannot make or sort of year is 2001 here.
This is all BMW and.
Here.
Finally, let's print the message here.
Print f is my or.
My BMW year here.
The.
And.
My bmw.here.
And let's print this.
Here, as you can see here.
Finally, you will print a message and extract the number or extract the year of my car using 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 C plus plus guarantees that members will sequential in memory, although some implementations require
members to be aligned along word boundaries.
So which depends on the CPU register length.
So as a general rule, you should order members from largest to smallest within pod definitions.