I have the following error in my code:
error: allocating an object of abstract class type \'Material\'
I don\'t know how to handle this case.
http://www.cplusplus.com/forum/beginner/236974/ contains the proper solution. The make_shared should be of the specific type; you can then without issues store this in a unique_ptr of the abstract type.
make_shared
unique_ptr