Was the parent class a c++ class? Sometimes the location where the .h and .cpp files get saved defaults to the Intermediate directory rather than under the Source directory. Because the Intermediate directory is meant only for temporary files these files get deleted.