error: expression must have a class type

后端 未结 3 1361
我寻月下人不归
我寻月下人不归 2020-12-04 00:50

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:

#in         


        
3条回答
  •  长情又很酷
    2020-12-04 01:37

    Assuming the implementation of the Worker class is ok and no other errors,

    int main()
    {
    
        Worker myWorker;
        myWorker.inputInfo();
        myWorker.displayPayBarGraph();
    
    }
    

提交回复
热议问题