password.cpp: In function 'std::string guess(int, int)':
password.cpp:24:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
24 | for (int j = 1; j <= ans.length(); j++)
| ~~^~~~~~~~~~~~~~~
password.cpp:27:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | string assd = (j != ans.length() ? ans.substr(j, (int)ans.length() - j) : "");
| ~~^~~~~~~~~~~~~~~
password.cpp:35:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
35 | assd = (j + 1 != ans.length() ? ans.substr(j + 1, (int)ans.length() - j - 1) : "");
| ~~~~~~^~~~~~~~~~~~~~~
password.cpp:14:9: warning: 'prev' may be used uninitialized in this function [-Wmaybe-uninitialized]
14 | int prev;
| ^~~~