'this' argument has type const but function is not marked const

前端 未结 4 923
灰色年华
灰色年华 2021-02-04 00:44

Okay so I\'m a bit of a noob at C++ and in my second assignment I am required to make classes with public and private arguments etc, etc. Basically the mutator functions won\'t

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-04 01:14

    You've declared PhoneNumber_, Name_ and Address_ as string.
    But in the setter methods, you are passing unsigned (int)

    Also, you have reversed the usage of getters and setters!

    Also, the return types of setters can be just void and not const void.

提交回复
热议问题