thx ALOT for that, great info =)
never heared of copy constructors & assignment operators, will look into it
thx ALOT for that, great info =)
never heared of copy constructors & assignment operators, will look into it
First off, using "struct" before the type of a struct is an archaic rule from C. You don't need to do it. Simply typing "hashstruct" or "dataset" is enough.
Now:
unsigned int mysize = 500;
myhash = new hashstruct[mysize];
Prefer not to use new here. In case you need a dynamic array (ie, whose size is set at runtime), then prefer to use std::vector.