title: conversion from derived * to base * exists but is inaccessible
body: <p>Why does the follwing code produce this error even though c is a struct and has a public inheritance by default??</p>
  
  <pre><code>struct c 
  {
  protected:
      int i;
  public:
      c(int ii=0):i(ii){}
      virtual c *fun();
  };
  
  c* c::fun(){
      cout&lt;&lt;"in c";
      return &amp;c();
  }
  
  class d : c
  {
   public:
      d(){}
      d* fun()
      {
          i = 9;
          cout&lt;&lt;"in d"&lt;&lt;'\t'&lt;&lt;i;
          return &amp;d();
      }
  };
  
  
  int main()
  {
      c *cc;
      d dd;
      cc = &amp;dd;
      cc-&gt;fun();
  }
  </code></pre>