title: Passing an object as a parameter in C++
body: <p>I'm currently running into a few problems surrounding passing an objects return value through a function. My function is prototyped in .h and defined in .cpp. the function for example <code>Class::function(int value);</code> takes in an integer of value. When I'm calling the object <code>objectName name;</code> and passing it through as <code>Class::function(name);</code>.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>// foo.h
  class foo
  {
       void function(int value);
  }
  
  
  //foo.cpp
  void foo::function(int value)
  {
       // CODE HERE
  }
  
  
  //main.cpp
  int main()
  {
       objectName name;
       foo::function(name);
  }
  
  </code></pre>
  
  <p>The errors that I am receiving go along the lines of:</p>
  
  <blockquote>
    <p>Main.cpp:43:23: error: no matching function for call to ‘class::function(objectName&amp;)’
        name.function(name); // passes value to the function</p>
  </blockquote>