inherited function inaccessable in C++
<p>I am writing a small program in Visual C++ 2010.</p>

<p>This is code of the base class:</p>

<pre><code>class BaseInfo {

private:
    std::map &lt;std::string, std::string&gt; info;
    std::vector&lt;std::string&gt; extra_info_key;
public:
    uint get_id ();
    //Other function is hidden
};

uint BaseInfo::get_id () {
    return (uint)atoi ((info["ID"]).c_str());
}
</code></pre>

<p>Then I make a derived class, which is announced as:</p>

<pre><code>class test:BaseInfo {
public:
    void f();
};

void test::f (test&amp; inf) {
    cout&lt;&lt;inf.get_id()&lt;&lt;endl;
}
</code></pre>

<p>But I got an error:</p>

<blockquote>
  <p>function "BaseInfo::get_id is inaccessible.</p>
</blockquote>

<p>I am confused, it seems all is in the c++ rules.</p>
