S SearchRSS
< BackHome
Newest questions tagged c++ - Stack Overflow

How to implement 2D, 3D, etc. vectors with one templated struct?

I need to work with vectors (that is mathematical vectors, not dynamic arrays) of different dimension, and I'd rather not duplicate a bunch of code unnecessarily. The trouble is, vectors of different dimension are differ

View original source