We are required to declare all methods in the header, but that should be fine!
Thanks for the other code but I wanted to know the differences in use between a struct and a class? Because as far as I'm aware the referencing is slightly different.
When passed to methods, structures, just like primitive data types(e.g. integer, boolean) are passed by value. Which means a copy of structure is passed and any changes made to the passed structure will not affect the original structure. Whereas a class is passed by reference and any changes made to the passed instance of class will change the original value.
classes are safer because they start out as private
only reasons struct is there is to work with C codes.
Ehhhhhh
It's more of a conceptual difference.
Classes are for making self contained, encapsulated objects. Whereas structs are for making groups of data that are related in some way, but don't need to be encapsulated. Generally stucts have public data members and little/no member functions, whereas classes have public member functions and little/no public data members.
Of course there's no rule that says you HAVE to use structs/classes that way, but that's generally how they're perceived.
structs with public members still have a place in C++ and OOP. Not everything needs to be encapsulated all the time.