cannot find default constructor to initialize member in cpp

后端 未结 2 709
离开以前
离开以前 2020-12-22 04:10

Please help me with this. I was trying to fix this for two hours. This is my code.

class deviceC {

private:
    deviceA devA;
    deviceB devB;
    wayPoint         


        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-22 04:48

    Missed a bracket.

    class deviceC{
    
        private : deviceA devA;
                      deviceB devB;
                      wayPoint destination,current;
    
        public: deviceC(wayPoint destination1){
                destination=destination1;
                devA=deviceA();
                devB=deviceB();
        } // <-- here
    };
    

提交回复
热议问题