Khi overload operator ‘=’ thì bị thông báo lỗi như trên, như thế nghĩa là sao? Khắc phục như thế nào ạ?
File Lecturer.h:
#ifndef LECTURER_H
#define LECTURER_H
#include "defination.h"
...
class Lecturer {
Lecturer& operator= (const Lecturer& L);
}
...
#endif
File Lecture.cpp:
//Thông báo lỗi ở đây
Lecturer& Lecturer::operator= (const Lecturer& L) {
if(this == &L)
return *this;
id_number = L.id_number;
name = L.name;
major = l.major;
qualification = l.qualification;
position = l.position;
return *this;
}

Cũng chẳng hiểu tại sao hết lỗi luôn
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?