Your code has undefined behaviour:
foo.cc: In function ‘std::__cxx11::string Generate(unsigned int, std::__cxx11::string)’:
foo.cc:87:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Turn on compiler warnings in your compiler and read them.
Once you’ve done that and see that your code doesn’t do what you intended think of why Generate can not generate all possible passwords and return them.
1
solved Password cracker returning _Parent_proxy was 0xCCCCCCCC