function definition error

hey everyone...i cant figure out how to implement the erode function in VC++ from blepo library.....i implemented the function but its giving error as "local function definition illegal"......if i have to erode the image what body of the function should i write......

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 void Erode3x3      (const ImgGray& img, ImgGray* out)
{
for (p.x=0;p.x<=img.Width()-1;p.x++)
{

for (p.y=0;p.y<=img.Height()-1;p.y++)
{
if ( img(p.x-1, p.y)==img(p.x,p.y)   && img(p.x, p.y-1)==img(p.x,p.y)   && img(p.x+1, p.y)==img(p.x,p.y)  && img(p.x, p.y-1)==img(p.x,p.y))
{
img(p.x,p.y) = 1;
}
else
{img(p.x, p.y) = 0;
}
	fig2.Draw(img2);
}
}
} 

img(p.x,p.y) = 1;
What is this supposed to mean?
Topic archived. No new replies allowed.