www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/05/02:17:26

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problem with fstreams...
Date: 5 Sep 1997 04:33:53 GMT
Organization: The National Capital FreeNet
Lines: 38
Message-ID: <5uo23h$i0o@freenet-news.carleton.ca>
References: <Pine DOT SGI DOT 3 DOT 93 DOT 970829111108 DOT 28565A-100000 AT gibson> <5u62mh$9l6 AT freenet-news DOT carleton DOT ca> <34077a34 DOT 845806 AT snews DOT zippo DOT com> <5u8pmk$7j1 AT freenet-news DOT carleton DOT ca> <34087191 DOT 15417632 AT snews DOT zippo DOT com> <340B1EAB DOT 1F5BC046 AT alcyone DOT com> <5uisve$sfg AT freenet-news DOT carleton DOT ca> <340D923A DOT 5D72DAB0 AT alcyone DOT com>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet2.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


Erik Max Francis (max AT alcyone DOT com) writes:
> Paul Derbyshire wrote:
> 
>> How do the enum elements BINARY and so forth become members of ios, as
>> in
>> ios::, and not of some enum? Normally the :: thing only applies to
>> member
>> functions and instance variables, not to enums. Is the enum actually
>> inside the class? Can a class contain structs and subclasses actually
>> inside itself so they are only defined in the scope of the class, for
>> naming purposes?
> 
> Yes.  In C++ if you have full scoping, so lexical elements can be
> defined inside classes:
> 
>     class C
>     {
>       public:
>         struct S { int i; };
> 
>         enum E { e1, e2 };
>     };
> 
> Inside the scope of the class, you can refer to these things as S and E,
> but outside you must refer to them as C::S and C::E (and the enum names
> as E::e1 and E::e2).

And this is what ios::binary is?

class ios {
  enum suchlike {binary,output,...}

--
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019