communicate via USB at run-time as well as using these ports to program the device
I don't know much about the 8U2 but I would say that in theory you could program via the USB but you'd have to write your own boot loader.
Failing that use the normal ISP and buy a programmer.
Even if you go the bootloader path you'll need an ISP programmer to burn that.
As for communicating at run time, that's what the new Arduinos do, but does the 8U2 handle all the USB protocol as well, or just the hardware interface. If it doesn't do the software you're in for a heck of a lot of programming.
So how can I use C++ to send digital data via USB to my device?
No idea.
______
Rob