The first time through the for loop in the recurse() function, the variable "c" has been declared but is unassigned, probably contains garbage. Who knows what appending it to "s" does in that case.
Aside from the fact that you're using QString and QChar, what does this have to do with Qt? It's a basic C++ programming error problem.
By the way, "BruteForce" and "recurse" are very clever names for functions. I am sure when you look at this code a year from now, you'll be able to tell from the names exactly what those functions are supposed to do, assuming you ever get them to do what you intend for them to do.
Bookmarks