Create randomIndex.cpp