foo.cpp: In function 'int rank(int)':
foo.cpp:144:6: warning: unused variable 'p' [-Wunused-variable]
int p=find(k);
^
foo.cpp: In function 'int main()':
foo.cpp:162:23: error: reference to 'rank' is ambiguous
printf("%d\n",rank(q));
^
foo.cpp:143:5: note: candidates are: int rank(int)
int rank(int k){
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\move.h:57:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_pair.h:59,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\utility:70,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:60,
from foo.cpp:5:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note: template<class> struct std::rank
struct rank
^