Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Private member accessibility from private class
Hi! Using 8.45 for code: class tmPart { private: static char sEndl; struct Endl { char mEndl; Endl(char eol) {mEndl = sEndl; sEndl = eol;}; ~Endl() {sEndl = mEndl;}; }; }; I'm getting: test.cpp(6) : Error: member 'tmPart::sEndl' of class 'tmPart' is not accessible test.cpp(7) : Error: member 'tmPart::sEndl' of class 'tmPart' is not accessible I'm not sure whether this should be expected or not. Is that fine? Up to now I tested VC, Borland and GCC and they accept it. Great to see another year with DMC! ABX Jan 02 2006
Włodzimierz Skiba wrote:Using 8.45 for code: class tmPart { private: static char sEndl; struct Endl { char mEndl; Endl(char eol) {mEndl = sEndl; sEndl = eol;}; ~Endl() {sEndl = mEndl;}; }; }; I'm getting: test.cpp(6) : Error: member 'tmPart::sEndl' of class 'tmPart' is not accessible test.cpp(7) : Error: member 'tmPart::sEndl' of class 'tmPart' is not accessible I'm not sure whether this should be expected or not. Is that fine? Up to now I tested VC, Borland and GCC and they accept it. Jan 03 2006
"Bertel Brander" <bertel post4.tele.dk> wrote in message news:dpf7hn$1i60$1 digitaldaemon.com...I think DMC is right. Jan 03 2006
|