memory access cache polution is STILL not a problem. as you HAVE to use my arrays the "other way around" to get the same behaviour as the original c array anyways. there is no way around it.
I never said it was a problem if you used it the way you intend I just said
that it's contra intuitive and will in most cases thrash the cache for anyone
trying to use it instead of a normal 2D array. Changing access order of arrays
is quite much like making a numberclass where + means - and - means +
sure the class author can make it compute the right things but anyone not
familar with the innerworkings of it will get into trouble with seemingly faulty
results. It's just one of those design guidelines don't surprise people with
stuff like this if it's going to act as a drop in replacement.
never said i like my code.. its merely there to be useful for newbies to see the power and the poverty of c++.. you can do everything you want, if you know how, and what. but 2d arrays in c++ are still done best by doing them 1d..
I never said you said, I just pointed out some obvious flaws and something very
close to abusive design. Im not attacking you or your ability to code Im merly
pointing out issues with the code you posted.
And about the 2D arrays are best done using 1D, yes, but wrapping them makes
them easier and less error prone to use without costing you any performance.
Also it makes it easier to have convinence functions to use STL algorithms,
and I really hope you don't dynamicly allocate 1D arrays instead of using
yep, line could be a subclass of array2d..
NO! It should be a member class of array2d that's probably what you ment
but a subclass is a wholy diffrenty entity.