Topic: New types (was: new bool type)
Author: swf@tdat.ElSegundoCA.NCR.COM (Stan Friesen)
Date: Wed, 5 Jan 94 10:52:15 PST Raw View
In article <2512@swuts.sbc.com>, sg3235@sw1sta.sbc.com (Stephen Gevers) writes:
|>
|> I am going to open a can of worms here: When I first used C++, I thought that
|> C++ would differentiate between two typedefs. I was disappointed when I found
|> that it wouldn't work. It would be nice if there existed a keyword that would
|> actually become a new type (sort of like typedef). ...
There is -- 'class'.
for instance:
class bool {
public:
operator int();
enum {false, true};
...
private:
int val;
};
--
swf@elsegundoca.ncr.com sarima@netcom.com
The peace of God be with you.