i have written a code in matlab.... it goes like
I=imread('path');
c=~im2bw(i);
[x,y]=find(c==1);
a=median(x);
b=median(y);
d=plot(b,a,'r.');
imshow(d);

basic task is to take an image of a block with a small circle mark.... find the location of circle ([x,y] in code above)....find centre of circle (a, b in this code)....and place a red dot over there...
plz help me doing same in c or c++

Actually u can see a litle white dot there, its not that big but you can see it.When u r plotting it and labelling it with red, it appears big. To see that actuall there is some dot there use f=~d;imshow(f); now u will now see the black dot.