class Accel
{
public:
Accel(conststruct &F);
etc...
};
I know this is wrong, it won't compile. I'm looking for WHY it is wrong, and how to fix it. I've been told that I need a type for my struct, but not how to do that. F is a struct made up of doubles (Fx, Fy, Fz). I obviously do not know a lot about structs, and maybe I shouldn't be programming with them, as I am more comfortable with vectors, but I wanted something that I could name the components more easily.
Reason:
After struct F {double Fx, Fy, Fz;};
F is a new type, just like int, double, char or whatever.
So where you would use void Function(constint& Data)
you should use void Function(const F& Data)