Added sample2.cpp in Other branch