added cpp template for future codes