[Solved] what is the reason of this error?


The problem is that the class definitions are not visible to the compiler when you try to access members of an instance. Although you have provided forward declarations for the classes this is not enough. In the .cpp and .h files that access members of these classes or require their sizes you need to include all appropriate headers so that their definitions are visible at the point of use. In this case however your Album class appears to require the definition of Song rather than just a forward declaration.

In Album.h add

#include "Song.h"

In customer.cpp add

#include "Album.h'

and so on…

1

solved what is the reason of this error?