title: C++: Access to a public member function from outside of a class
body: <p>I have a class defined in a separate file and at some point I need to access one of the public member functions from another source file. For some reason, I forgot how to do that and compiler gives me an error.</p>
  
  <p>I have classA.h with definition of class A similar to this:</p>
  
  <pre><code>class classA {
    public:
    int function1(int alpha);
  }
  </code></pre>
  
  <p>And a separate file classA.cpp with the implementation. And then in some other file blah.cpp I include the header and try to access it like this: </p>
  
  <pre><code> classA::function1(15);
  </code></pre>
  
  <p>and my compiler refuses it with error that it could not find a match for 'classA::function1(int)'.<br>
  I use Embarcadero RAD studio 2010 if that matters. </p>