title: Cpp define in classes
body: <p>I started C++ programming few weaks ago and i have a question about defining the file of a class in a separate file. This is my code.</p>
  
  <h1>main.cpp</h1>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Maths.h"
  int main() {
    Maths m;
    int s = m.sum(1,2);
    std::cout &lt;&lt; s &lt;&lt; std::endl;
    return 0;
  }
  </code></pre>
  
  <h1>Maths.h</h1>
  
  <pre><code>#ifndef Maths_H
  #define Maths_H
  
  class Maths
  {
    public:
      int sum(int a, int b);
  };
  
  #endif
  </code></pre>
  
  <h1>Maths.cpp</h1>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Maths.h"
  int Maths::sum(int a, int b)
  {
    return a + b;
  }
  </code></pre>
  
  <p>Why is it that you can't <code>#define</code> the same name as your class name. For example in my script Maths?
  <a href="https://repl.it/repls/UnwillingFreeHeterodontosaurus" rel="nofollow noreferrer">https://repl.it/repls/UnwillingFreeHeterodontosaurus</a></p>