add main.cpp on tutorial2 branch