Fixed Makefile and copied sample into a cpp file