new file:   generate.cpp