added C++ singleton samples