Path: utzoo!attcan!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.lang.c++ Subject: Re: conversions Message-ID: <54079@microsoft.UUCP> Date: 13 Apr 90 18:13:31 GMT References: <7633@cadillac.CAD.MCC.COM> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Organization: Microsoft Corp., Redmond WA Lines: 14 >I realize that a class that works Exactly >like an int for both reading and assignment probably isn't very >useful, but should I be able to do it this way? Actually, such a beast might actually be vaguely useful -- because it differs from int in one important way: INT is a first-class class and as such can be inherited from, whereas int is a primitive. Consider a class LINK and a class INT: create LINKED_INT by multiplying inheriting from LINK and INT. LINKED_INTs can be linked together and tranversed using the capabilities of LINK, and LINKED_INTs can be used as-if ints in math expressions. ....one could then go on and use these capabilities to make queues of INTs or stacks of INTs if one was really perverse.... Weak example, but you get my drift.