Path: utzoo!attcan!uunet!snorkelwacker!apple!agate!darkstar!ucscb.UCSC.EDU!growf From: growf@ucscb.UCSC.EDU (Purple dragons! EVERYWHERE!!!) Newsgroups: comp.std.c++ Subject: Re: Scope of static member initializers Message-ID: <5704@darkstar.ucsc.edu> Date: 3 Aug 90 16:10:13 GMT References: <1990Aug1.030632.2273@agate.berkeley.edu> <10603@batcomputer.tn.cornell.edu> <1990Aug2.214222.14165@agate.berkeley.edu> Sender: usenet@darkstar.ucsc.edu Organization: University of California, Santa Cruz; Open Access Computing Lines: 20 In article <> lippin@math.berkeley.edu writes: >const bounded bounded::max=maxp; { maxp was a member of bounded } > >My CFront declares the last line invalid, saying that maxp is not >defined. But now the problem is not so clear-cut to me; perhaps this >implementation is wrong? Maybe I just haven't worked with this, but it seems to me that the scope declarations on one side of an assignment wouldn't apply to the other, at least not by default. Thus, since you didn't specify that maxp was a member of bounded, it looked in the local scope. Did you try: const bounded bounded::max=bounded::maxp ? If this isn't the way things work, it should be, in my opinion... And if this is what you said in your message, forget this, but I don't think it is. ==GROWF!