|
|
A while ago I made my own vector class, mostly just for the experience, but I figured it should be usable, and it is. But recently my teacher asked if I could make a 2 dimensional array with the vector class, and that's where I ran into a snag. I figured, "A vector of vectors", so I tried:
Vector *v = new Vector(10, 5)
Where the arguments are the number of elements to start out with, and how many spots to expand when there's an overflow. Unfortunately, this doesn't actually work. The school's compiler seems to have a problem with a template object as the argument for, well, a template object. Any suggestions?
|