..\src\cpps\../headers/sinhvien.h:9: error: field 'namesv' has incomplete type
..\src\cpps\sinhvien.cpp: In constructor 'Sinhvien::Sinhvien()':
..\src\cpps\sinhvien.cpp:7: error: 'namesv' was not declared in this scope
..\src\cpps\sinhvien.cpp: In constructor 'Sinhvien::Sinhvien(std::string, int)':
..\src\cpps\sinhvien.cpp:13: error: 'class Sinhvien' has no member named 'namesv'
..\src\cpps\sinhvien.cpp:13: error: 'name' was not declared in this scope
..\src\cpps\sinhvien.cpp: In member function 'std::string Sinhvien::getName() const':
..\src\cpps\sinhvien.cpp:24: error: 'namesv' was not declared in this scope
I don't know why std::string causes error in here ? If I don't use string (by the way replace string by int), everything's normal !
If you are using std::string than most likely the header is in system path.
#include "string"
Change above to #include<string> and see how.
And also usually for system headers we include them in our .h file instead of .cpp file by convention. This help us to put all system headers at a centralized place for easier reference. Then the .cpp will include the .h which will see those system headers already.