Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!bywater!arnor!watson!blinn.watson.ibm.com!mittle From: mittle@blinn.watson.ibm.com (Josh Mittleman) Newsgroups: comp.lang.c++ Subject: Re: beginners question Message-ID: <1991Jun06.181745.26256@watson.ibm.com> Date: 6 Jun 91 18:17:45 GMT References: <1991Jun5.090228.27147@sinix.UUCP> Sender: @watson.ibm.com Organization: IBM T. J. Watson Research Lines: 13 This is no small problem that you've encountered; several other recent postings were other version of the same thing. What you are looking for is multiple polymorphism, i.e., the ability to have a virtual function depend on the types of more than one of its arguments. C++ does not provide this feature. There are way around it, but none of them are particualrly satisfying. A good discussion of the subject, particularly addressing the domain of interest to you, can be found in "Generalized arithmetic in C++", by Timothy A. Budd, which appears in the Feb. 91 issue of the Journal of Object-Oriented Programming, pp.11-22. =========================================================================== Josh Mittleman (mittle@watson.ibm.com or joshua@paul.rutgers.edu) J2-C28 T.J. Watson Research Center, PO Box 704, Yorktown Heights, NY 10598