foo.cc: In function ‘int FindMinPos(int*, int)’:
foo.cc:11:16: warning: ‘index’ may be used uninitialized [-Wmaybe-uninitialized]
11 | return index;
| ^~~~~
foo.cc:4:24: note: ‘index’ was declared here
4 | int min=100000,index;
| ^~~~~
foo.cc: In function ‘int main()’:
foo.cc:22:33: warning: ‘index’ may be used uninitialized [-Wmaybe-uninitialized]
22 | cout<<FindMinPos(a,n1)<<" "<<FindMinPos(b,n2);
| ^~~
foo.cc:4:24: note: ‘index’ was declared here
4 | int min=100000,index;
| ^~~~~
foo.cc:22:53: warning: ‘index’ may be used uninitialized [-Wmaybe-uninitialized]
22 | cout<<FindMinPos(a,n1)<<" "<<FindMinPos(b,n2);
| ^
foo.cc:4:24: note: ‘index’ was declared here
4 | int min=100000,index;
| ^~~~~