低级困惑

class Student
{
 public:
    Student(char* pName)
      {
         strcpy(name, pName);
         name[sizeof(name)-1]= ‘’;

       }
 protected:
        char name[20];
 }

 构造函数里面这一行必须有么?
 name[sizeof(name)-1]= ‘’;

Posted in
Tagged with

One comment on “低级困惑

Comments are closed.