add sample.cpp