EDIT: This is a homework question I'm working on. I can't use any for/while loops anywhere in my code. The point of the program is to have the user enter a word, then it will search a dictionary for anagrams.
I'm trying to use recursion everywhere in my code rather than using a while loop or for loops. I'm stumped on how to change the following code into recursion:
while (!infile.eof())
{
string line;
getline(infile, line);
dictionary.push_back(line); //using a vector to store a dictionary
}