So I'm working on this assignment for finding anagrams, and I have it at that, code complete ready to run and change stuff so it runs right phase.. debugging.
It seems to be acting up at my keyHolder function and in for_each. I tried stepping through it in the debugger, but I can't step into my own function for keyHolder, it goes into xstring lala land.. Also, I failed at functors, but that's another topic for now. Anyone have any ideas on why this is failing at that point. line 75 - 77.
i couldn't spot any error but of course it must exist.
I suggest you try out the good old method of cout at every step to see what the program is doing correctly and where it is giving unexpected results.
For instance check that the dictionary vector is made correctly and within each function you output the parameters to see when and why the program is malfunctioning.
for_each is called on each object in your dictionary, so each call starts the function over again, meaning the matches vector, and other stack variables are recreated on each object.