Added the foo.cpp file and changed main.cpp to reflect move of the foo function to its own file.