Create BFS implementation using c++