Need help understanding creation and usage of Structs

Post the updated code such that it is easier to help.