C++ - class issue

前端 未结 6 1674
灰色年华
灰色年华 2021-01-24 19:33

At: http://www.learncpp.com/cpp-tutorial/82-classes-and-class-members/

There is the following program (I made some small modifications):

#include 

        
6条回答
  •  梦毁少年i
    2021-01-24 19:55

    Regarding the last warning/error message - the first parameter of the setInfo() member function should be declared as const char*. Plain char* represents pointer to a mutable character array, which string literal "Abder-Rahman" isn't.

提交回复
热议问题