g++ compatible explore_sample.cpp