password.cpp:9:9: warning: ISO C++11 requires whitespace after the macro name
9 | #define s.length() (int)(s.length())
| ^
password.cpp:9:10: error: expected ',' or '...' before '.' token
9 | #define s.length() (int)(s.length())
| ^
password.cpp:13:25: note: in expansion of macro 's'
13 | string guess(int n, int s)
| ^
password.cpp: In function 'std::string guess(int, int)':
password.cpp:9:10: error: expected primary-expression before '.' token
9 | #define s.length() (int)(s.length())
| ^
password.cpp:19:25: note: in expansion of macro 's'
19 | for (int i = 0; i < s; i++)
| ^
password.cpp:9:21: error: expected primary-expression before 'int'
9 | #define s.length() (int)(s.length())
| ^~~
password.cpp:19:25: note: in expansion of macro 's'
19 | for (int i = 0; i < s; i++)
| ^
password.cpp:9:26: error: 's' was not declared in this scope
9 | #define s.length() (int)(s.length())
| ^
password.cpp:19:25: note: in expansion of macro 's'
19 | for (int i = 0; i < s; i++)
| ^
password.cpp:27:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | for (int j = 1; j <= ans.length(); j++)
| ~~^~~~~~~~~~~~~~~
password.cpp:43:30: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
43 | if (ans.length() == n) break;
| ~~~~~~~~~~~~~^~~~
password.cpp:45:26: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
45 | if (ans.length() == n) break;
| ~~~~~~~~~~~~~^~~~