Create main.cpp

Creates the main body for this function. Ported from Microsoft Visual Studio