readme update cpp main added

Updated Readme and added the code for main.cpp