no matching function to call to “standard constructor”

前端 未结 4 1017
醉梦人生
醉梦人生 2021-01-20 04:27

I get a weird response from my c++ compiler. I searched the internet but came up with nothing usefull or helpfull...

Compiler Response:

4条回答
  •  借酒劲吻你
    2021-01-20 05:20

    HexFloatingPoint is derived from FloatingPoint, but you don't call any of FloatingPoint's constructors in the initialiser list in HexFloatingPoint's constructor. This means the default (no-parameter) constructor of FloatingPoint gets called, but the class doesn't define it, so you get the error.

    Either call a constructor of FloatingPoint in HexFloatingPoint's initialiser list, or give FloatingPoint a default constructor.

提交回复
热议问题