title: Error while trying to use multiple classes with a constructor for a makefile
body: <p>I'm experimenting with makefiles, but it's not quite working out for me right now. The experiment is simple: a main.cpp that creates a robot with a function sayHello() that outpus "robot says hello" to the terminal. This is the code in my files.</p>
  
  <p>robot.h:</p>
  
  <pre><code> #include &lt;stdio.h&gt;
      class Robot(){
  
      public:
              Robot();
      public:
              void sayHello();
  
      };
  </code></pre>
  
  <p>robot.cpp</p>
  
  <pre><code>#include "robot.h"
  
  Robot::Robot()
  {
  void Robot::sayHello(){
          printf("Robot says hello \r\n");
  }
  
  };
  </code></pre>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include "robot.h"
  
  
  Robot robocop();
  int main(void)
  {
          printf("hello world \r\n");
          robocop.sayHello();
          return 0;
  }
  </code></pre>
  
  <p>the error is as follows:</p>
  
  <p>robot.h:2:13: error: expected unqualified-id before ‘)’ token
   class Robot(){
               ^
  main.cpp: In function ‘int main()’:
  main.cpp:9:10: error: request for member ‘sayHello’ in ‘robocop’, which is of non-class type ‘Robot()’
    robocop.sayHello();</p>
  
  <p>I've been trying on this for too long and could use some help. Thanks!</p>