error C2512: no appropriate default constructor available

后端 未结 4 1881
栀梦
栀梦 2021-01-17 09:26

I am getting this annoying error and I don\'t know why =( ! This is the question , I solved it but I am having a problem with the constructor.

Write a

4条回答
  •  情书的邮戳
    2021-01-17 10:28

    You should define a constructor with no parameters called default constructor. You can initialize related members to the default values.

    Circle::Circle()
       {
       radius = 0.0
       }
    

提交回复
热议问题