Hi all,
I have defined a function in my Doc.h file that uses several variables also defined in this file, one of which is the definition of
struct lineSeg{
	struct vector r1;
	struct vector r2;};
I have another function that belongs to a Class that needs to access one of these outside functions. I have declared a pointer of type CDoc to enable me to get at this outside function. Below is the code for the class function ncrosses
int CLine::ncrosses(int m_XYCoOrds[][2])
		CLinesDoc* pDoc;// 
	ASSERT_VALID(pDoc);//get pointer to Doc 

	int NumLines = 0;
	int x1 = 0;
	int y1 = 0;
	int x2 = 0;
	int y2 = 0;

	for(int t=0;t<10;t++)
		x1 = m_XYCoOrds[t][0];
		y1 = m_XYCoOrds[t][1];
		x2 = m_XYCoOrds[t+1][0];
		y2 = m_XYCoOrds[t+1][1];

		struct LineSeg *l1; 
		int i,j,count=0;


		{  for(j=0;j<NSIDES;j++)
				/*printf("hit %d ",i); */   /* only need to know about one line
				      crossed to know zone crossed or partially
				      crossed, could modify to get more info.*/
		return count;

However when I try and compile the program it throws up an error saying
Line.cpp(140) : error C2440: '=' : cannot convert from 'struct CLinesDoc::lineSeg *' to 'struct CLine::ncrosses::lineSeg *'
I think the problem is that the line in red is declaring a variable in CLine object, which then can't be passed to the function coords2lineSeg(x1,y1,x2,y2); in CLinesDoc. Is this right, is it making any sense so far? I don't know what to do, I am a begining windows programmer and don't know if everything is in the right place. Any help at all would be much appreciated, even if its just to tell me where to put everything properly.