add snippet for cpp refs #36