This is the process of adding a constructor to an existing inheritance class code.
No instance of constructor MyFriendDetailInfo::MyFriendDetailInfo matching argument list MyFriendDetailInfo:::MyFriendDetailInfo(char*, int, char*): Argument 1 is: Cannot convert from const char to char*
Two of these errors appear.
I've removed the extinctionc++ inheritance constructor
Because a literal string such as
"Name" is a non-modifiable string, the address cannot be stored in the
char * type pointer, and the address must be stored in the
const char * type pointer.
Therefore, code such as
MyFriendDetailInfoFriend1("Name", 23, "Address", "010"); needs to be modified as below.
© 2022 pinfo. All rights reserved.