Redefinition errors in .h files
you need include guards in your header files.
Possible problem of multiple inclusions.
Try to guard your header files with #ifndef
read about it here
file list.h
#ifndef _LISTH_
#define _LISTH_
<your code>
#endif
file matrix.h
#ifndef _MATRIXH_
#define _MATRIXH_
<your code>
#endif
It will prevent you too have redefinitions if you have a loop in header inclusions.