AM> AM> What is the standard vector template? I know the MFC CArray clas
AM> TM>It's a class template included in the Standard C++ Library (aka
AM> And what is its name?
vector
AM> Is it possible to create a template class requiring in the TYPE
AM> class some operators?
AM> Something like:
AM> template class Finite_Dimensional_Field
AM> public:
AM> Field v[dimension];
AM> // here force Field to have operator+(Field &, Field &) and ...
AM> // operator*(Field &, Field &) and some other math stuff
AM> };
Yes. Just use these operators. The compiler will refuse to instantiate
the template for a Field type that doesn't offer them.
AM> M$C++ doesn't include val_array :-(
You can download it from the Internet, but don't ask me for the URL.
val_array is quite a recent addition to the standard, I think.
Thomas
---
þ MM 1.0 #0113 þ Home is where the computer is plugged in.
---------------
* Origin: McMeier & Son BBS (2:301/138)
|