Why does this cpp see a function when its corresponding header does not?
<p>This one is making me scratch my head too long.</p>

<p>I have the following in a header test.h:</p>

<pre><code>inline void anything(){
std::cout&lt;&lt;" anything "&lt;&lt;ii;
}
</code></pre>

<p>Then I have a.h, which includes test.h:</p>

<pre><code>class Fooness{
public: 
Fooness(){
    anything(); //compiler reports "use of undeclared identifier"
    };
};
</code></pre>

<p>HOWEVER, if I simply move the function definition to a.cpp:</p>

<pre><code>Fooness::Fooness(){
anything();
}
</code></pre>

<p>It works. a.cpp includes test.h which includes a.h. Why is <code>anything()</code> only visible in a.cpp not a.h?</p>
