title: "invalid use of non static member function" What is this?
body: <p>EDIT: thanks for all the speedy responses, I have a much better understanding of this concept now. Also, I'll try to make my error messages more clear next time.
  EDIT: updated with my newest code. the error happens on line 18. Also, I'm beginning to wonder if my latest issue has to do with the original class itself?</p>
  
  <p>I'm trying to teach myself classes and objects in C++. I did it once by just declaring a <code>void</code> function, outputting something on the screen, calling the object in main and everything worked fine. </p>
  
  <p>Now, I wanted to expand upon this and make a simple addition thing. However, I get a couple errors on Code Blocks: </p>
  
  <pre><code>error: invalid use of non-static member function 'int Addition::add(int, int)'
  error: no matching function for call to 'Addition::add()'
  </code></pre>
  
  <p>Here's my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class Addition {
  public:
  int add (int x, int y) {
  int sum;
  sum=x+y;
  return sum;
  }
  };
  
  int main()
  {
  int num1;
  int num2;
  int ans=addobj.add(num1,num2);
  Addition addobj;
  addobj.add(num1,num2);
  cout&lt;&lt;"Enter the first number you want to add"&lt;&lt;endl;
  cin&gt;&gt;num1;
  cout&lt;&lt;"Enter the second number you want to add"&lt;&lt;endl;
  cin&gt;&gt;num2;
  cout&lt;&lt;"The sum is "&lt;&lt;ans&lt;&lt;endl;
  }
  </code></pre>