foo.cpp: In function 'int main()':
foo.cpp:14:17: error: reference to 'end' is ambiguous
cin>>start>>end;
^
foo.cpp:9:14: note: candidates are: std::string end
string start,end;
^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:42:0,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\string:52,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\initializer_list:99:5: note: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
end(initializer_list<_Tp> __ils) noexcept
^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\string:51:0,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\range_access.h:97:5: note: template<class _Tp, unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
end(_Tp (&__arr)[_Nm])
^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\range_access.h:78:5: note: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
end(const _Container& __cont) -> decltype(__cont.end())
^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\range_access.h:68:5: note: template<class _Container> decltype (__cont.end()) std::end(_Container&)
end(_Container& __cont) -> decltype(__cont.end())
^
foo.cpp: In function 'int bfs()':
foo.cpp:36:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i!=w1.size(); ++i)
^
foo.cpp:39:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(k<n.size())
^
foo.cpp:43:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(p==string::npos) break;
^
foo.cpp:47:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=0; j<w2[i].size(); ++j)
^
foo.cpp:49:52: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=p+w1[i].size(); j<n.size(); ++j)
^
foo.cpp:54:24: error: reference to 'end' is ambiguous
if(n1==end) return l[n1];
^
foo.cpp:9:14: note: candidates are: std::string end
string start,end;
^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:42:0,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\string:52,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\tdm-gcc-32\lib\gcc\mi