Compiler output
prog.cpp: In function 'int main()':
prog.cpp:27:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<v.size() && ok==0;i++)
^
prog.cpp:34:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<v.size();i++)
^
prog.cpp:32:41: warning: 'poz2' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(poz1<poz2) swap(v[poz1],v[poz2]);
^
prog.cpp:32:33: warning: 'poz1' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(poz1<poz2) swap(v[poz1],v[poz2]);
^