Writes random words from a dictionary, written in C++