Add main.cpp
Add file functions