AM> Ok. But as you must have imagined, I wish to generalize it to a
AM> n-dimensional Vector. Then I guess I can't initialize them this way
TM>No, I didn't imagine that (although I admit that I might have...).
TM>Yes, you are right. But then I'd suggest that you use the standard
TM>vector template.
What is the standard vector template? I know the MFC CArray class, and
it is tempting to create a derived Vector class [and also a Matrix
class, btw] adding the overload of double * Vector, Vector + (or -)
Vector, and Vector * Vector (scalar product). In fact, I have already
done those operations, for a class Vector with variable members int n
(dimension) and double * v (the array of elements).
Alberto Monteiro
---
þ SLMR 2.1a þ But violent use brings violent plans (Metallica)
--- FMail/386 1.02
---------------
* Origin: CentroIn! +55-21-205-0281, 41 lines, 24h, RJ/Brazil (4:802/21)
|