/in/foo.cc: In function 'int main()':
/in/foo.cc:20:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < str.length(); i++)
~~^~~~~~~~~~~~~~
/in/foo.cc:24:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (j = 0, k = i; j < s0.length(); j++, k++)
~~^~~~~~~~~~~~~
/in/foo.cc:27:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(j == s0.length() && (k == str.length() || str[k] == ' '))
~~^~~~~~~~~~~~~~
/in/foo.cc:27:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(j == s0.length() && (k == str.length() || str[k] == ' '))
~~^~~~~~~~~~~~~~~
/in/foo.cc:36:31: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
cout << ans << " " << p <<endl;
^