RE: Object constructors

"Shay Harding" <sharding-YCNXYxaMkU/[email protected]> Tue, 25 Mar 2003 05:50:47 -0700
Newsgroups gmane.comp.lang.moto.devel
Message-ID <000501c2f2cd$2823fda0$7500000a@ccbill22ms668m>
Ok, now I am really confused... after seeing Stefano's reply I went back and
changed the function in question back the way I had it (when it supposedly
was giving me errors) and now it works? Maybe I am just losing my mind...
permanently this time.


Shay

> -----Original Message-----
> From: Stefano Corsi [mailto:[email protected]] 
> Sent: Tuesday, March 25, 2003 1:41 AM
> To: Shay Harding
> Cc: [email protected]
> Subject: Re: [moto-devel] Object constructors
> 
> 
> > Works no problem since each constructor has a different number of 
> > args. When I try to declare:
> >
> > class A{
> >   A(String x){
> >
> >   }
> >
> >   A(boolean x){
> >
> >   }
> > }
> >
> > it tells me I am redefining A() since they each have 1 arg. 
> Is there 
> > no way to define different constructors with the same 
> number of args, 
> > but of different types?
> 
> Strange. This snipplet works no problem for me.
> 
> Stefano

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003