m during compiling my visual c++ express project...
I'm trying to use the e->graphic->drawlines(pen,point[]) function.
I used to allocate an array old way, i explain: if i want to allocate an array of Point, i write:
Point MyPointArray[100];
or, if i would to create a pointer toro an array, i should write:
Point *MyPointArrayPt; MyPointArrayPt = new Point[100];
Now, i learned i've to write:
Point ^MyPointArrayPt; MyPointArrayPt = gcnew Point[100];
then, use the
e->Graphics->DrawLines(MyPen,MyPointArrayPt)
So i've surfed a little the web and discovered the "new way" in array declaration:
array< Point^,1>^ MyPointArrayPt = gcnew array< Point^,1>(100);
And, surprise, it works... but if i try to use the
e->Graphics->DrawLines(MyPen,MyPointArrayPt);
error C2664: 'void System::Drawing::Graphics::DrawLines(System::Drawing::Pen ^,cli::array<Type,dimension> ^)': impossible to converte parameter 2 from'cli::array<Type,dimension> ^' to 'cli::array<Type,dimension> ^'.
Now, is particular that it can't converts array<Type,dimension> ^ to array<Type,dimension> ^, because they are the same thing.
Can someone tell me why and how to solve this problem
Tnx to all in Microsoft and to all who surf this forum anyway.