Now working correctly when I declared the head pointer in the
functionc.cpp file