title: Calling function in C++ without creating an object
body: <p>I've read of similar problems to this, but the solutions provided didn't work for me so.</p>
  
  <p>I want to call a function that exists in another class located in a different .cpp file. I don't want to create an instance of the object, I just want to use the function.</p>
  
  <p>My code that tries to call the function:</p>
  
  <pre><code>    switch (option)
          {
          case 1:
          cout &lt;&lt; "\nDoing stuff\n\n" ;
          Controller::AlbumOps SayHey();
          //SayHey should have run but isn't working
          break;
  </code></pre>
  
  <p>And the function I'm trying to call:</p>
  
  <pre><code>#include "Menu.hpp"
  #include "Album.hpp"
  #include "stdio.h"
  #include "AlbumOps.hpp"
  #include &lt;iostream&gt;
  using namespace std;
  
  
      namespace Controller
      {
          static void Controller::AlbumOps::SayHey ()
          { 
          cout &lt;&lt; "Hey\n";
          }
      }
  </code></pre>
  
  <p>When I execute the code, the Hey is never printed. I thought the solution was to make the function static but that hasn't worked for me.</p>