OpenCV error C2676 'struct _IplImage'

i started learning OpenCV lately and i have some problems in understanding the structures and how to cope with them.

1
2
3
4
5
6
7
8
9
IplImage *img1 = cvCreateImage(cvSize(width+2,height+2),IPL_DEPTH_32F,1);

	for(mheight=0;mheight<=height+1;mheight++)             		
		{
			for(int mwidth=0;mwidth<=width+1;mwidth++)         		
			{
			img1[mheight][mwidth]=0;
			}
		}


i m trying to set the default value of every pixel to 0.
I am using Microsoft Visual Studio C++ 6.0
The compiler shows this though:
E:\version 1.1\src\Video ProcessingDlg.cpp(330) : error C2676: binary '[' : 'struct _IplImage' does not define this operator or a conversion to a type acceptable to the predefined operator
Topic archived. No new replies allowed.