What do I need to do to only upload cpp files?

If you're providing your own main(), then you don't need setup() and loop() at all. Nick Gammon's website, , gammon.com.au, has a page that explains exactly how to write programs with their own main().

Regards,
Ray L.