How does array and struct classes work with dynamic alloc?
I do not want to use vectors yet.. just dynamic alloc with 3 simple arrays.. this is useful for reciepts.. and sorts..Am trying to test this for 3 simple data.. could replace it with something else this one is easy to trace.. but I admit this one is getting a little bit layered.. it will give me
1 2 3 4 5
C4183: 'setLength': member function definition looks like a ctor, but name
does not match enclosing class error C2228: left of '.setWidth' must have
class/struct/union type
You need to specify return types for your methods (setHeight and setWidth). In this case they don't need to return anything so the return type is void. Also if you want to actually access the height and width of each Yard, you will need to write accessor functions (e.g. getHeight and getWidth). Remember that these need to have a return type of int.