S
saneman
I am writing a container C to be used in a generic library (template
library). C are supposed to contain points in either 1,2 or 3 dimension (x),
(x,y) or (x,y,z).
My first thought was to use a std::vector containing structs with either
one, two or three fields (depending on dimension) but are there any better
ways to implement C when the code using it should not care what kind of
dimension is used?
library). C are supposed to contain points in either 1,2 or 3 dimension (x),
(x,y) or (x,y,z).
My first thought was to use a std::vector containing structs with either
one, two or three fields (depending on dimension) but are there any better
ways to implement C when the code using it should not care what kind of
dimension is used?