Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Re: nested clas...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 43692 of 48044
Post > Topic >>

Re: nested class inheriting from outer class

by Richard Lee <prodigynews@[EMAIL PROTECTED] > Mar 5, 2008 at 09:18 AM

The following does compile, but has other problems:

class A
{
protected:
     A() {}
};

namespace A
{
     class B : public A
     {
     public:
         B() : A() {}
     };
};

The problem is that if you later try to refer to class A, the compiler 
claims it is not a class, it's a namespace.  Aren't cl***** by 
definition namespaces?  Something seems broken here.

Again, using gcc version 4.1.3.

Richard
 




 2 Posts in Topic:
Re: nested class inheriting from outer class
Richard Lee <prodigyne  2008-03-05 09:18:05 
Re: nested class inheriting from outer class
Michael.Boehnisch@[EMAIL   2008-03-05 10:14:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 22:35:12 CDT 2008.