title: error: expression must have a class type
body: <p>I get the error: expression must have a class type
  Firstly, I don't understand why I am getting this error. I create and object and use it. 
  in my main:</p>
  
  <pre><code>#include "Worker.h"
  
  int main()
  {
  
      Worker myWorker();
      myWorker.inputInfo();
      myWorker.displayPayBarGraph();
  
  }
  </code></pre>
  
  <p>Worker.h</p>
  
  <pre><code>//Worker.h
  //Definition of class Workers
  //Member functions are defined in Worker.cpp
  
  
  //Worker class defintion 
  
  class Worker
  {
  public:
      Worker();               //constructor initializes worker type
  
      void inputInfo();           //attains worker information
      void displayPayBarGraph();  //prints a bar graph representation of the pay
  
  private:
  
      int workerCode;     //worker type
      //PAY FOR EACH WORKER
      double code1pay;            //manager
      double code2pay;            //hourly workers
      double code3pay;            //commission workrs
      double code4pay;            //pieceworkers
  
      int hourlyWorkerPay(double, int);   //returns the pay of hourly workers
      int commissionPay(int);     //returns the commission workers pay
      int pieceWorkerPay(int, int);   //returns the pieceworkers pay
  };
  </code></pre>