2008/6/5 Russ P. <[EMAIL PROTECTED]>: > On Jun 5, 12:20 pm, Roy Smith <[EMAIL PROTECTED]> wrote: > > > All somebody has to do to get at the private data is: > > > > #define private public > > # include <MySecretClass.h> > > #undef private > > Well, that shows the weakness of the C/C++ header files. The "include" > directive merely does a simple text substitution, which is pretty lame > as far as I am concerned. As you say, Java has moved beyond that, and > Ada has always been more sophisticated than that. > > By the way, my recollection is that in C++ access defaults to private > if nothing is declared explicity. So normally the "private" > declaration is unnecessary. If it is left out, your little trick won't > work. But your point is still valid. >
And also #define class struct #include "something.h" #undef class ;) Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher
-- http://mail.python.org/mailman/listinfo/python-list