Update Main.cpp

i put the definitions of the functions in with the prototypes. I believe these should work, if you see any errors feel free to adjust and if you want to move the definitions out then we can do that later i just am not entirely sure how github works yet.