add cpp dir and sample code