Generator partial solution

modified generator.h

 

partial generator.c