Error no appropriate default constructor available

前端 未结 2 1722
暖寄归人
暖寄归人 2021-01-29 01:16

I am implementing a list class with node and iterator, that creates a list of type Ticket, which is an object that i have defined in a class, but when i try to compile it says t

2条回答
  •  长发绾君心
    2021-01-29 02:09

    Ticket doesn't have a default constructor, therefore List can't be default-constructed since it inherits from Ticket, and List does not call a base constructor in Ticket.

提交回复
热议问题