------- Comment #2 from k_suresh_babu at yahoo dot com 2009-12-25 02:43 ------- Subject: Re: class members not getting assigned access thru another method
Hi, So a constructor can't call another method if that is the case then it is ok. You can close the issue. regards, sureshbk. --- On Wed, 12/23/09, redi at gcc dot gnu dot org <gcc-bugzi...@gcc.gnu.org> wrote: > From: redi at gcc dot gnu dot org <gcc-bugzi...@gcc.gnu.org> > Subject: [Bug c++/42472] class members not getting assigned access thru > another method > To: k_suresh_b...@yahoo.com > Date: Wednesday, December 23, 2009, 5:09 AM > > > ------- Comment #1 from redi at gcc dot gnu dot org > 2009-12-23 11:09 ------- > C++ is not java, you cannot delegate to another constructor > like this: > > primes::primes(ulong p):maxp(p) { primes(); } > > That creates a temporary object of type primes, it does not > call the > constructor. > > Therefore primes::i and primes::p are not initialised by > the primes(long) > constructor. > > > -- > > redi at gcc dot gnu dot org changed: > > What > |Removed > |Added > ---------------------------------------------------------------------------- > > Status|UNCONFIRMED > |RESOLVED > Resolution| > > |INVALID > > Version|unknown > |4.3.2 > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42472 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42472