
Vector3 Cross Operation for CLI/C++
Posted Tuesday, 21 December, 2010 - 21:26 by LikeTK inVector3^ v1= gcnew Vector3(0, 2.0f, 1.0f); Vector3^ v2 = gcnew Vector3(0, 1.0f, 0.0f); Vector3^ v3 = Vector3::Cross(v2, v1);
error C2665: 'OpenTK::Vector3::Cross' : none of the 2 overloads could convert all the argument types
Any feedback
Vector3 v1= gcnew Vector3(0, 2.0f, 1.0f); Vector3 v2 = gcnew Vector3(0, 1.0f, 0.0f); Vector3^ v3 = Vector3::Cross(v2, v1); //This is OK
But
Vector3 v1= gcnew Vector3(0, 2.0f, 1.0f); Vector3 v2 = gcnew Vector3(0, 1.0f, 0.0f);
error C2440: 'initializing' : cannot convert from 'OpenTK::Vector3 ^' to 'OpenTK::Vector3'


Comments
Re: Vector3 Cross Operation for CLI/C++
Is there something I can do to Re-Compile the source code to make the Cross method to take
Re: Vector3 Cross Operation for CLI/C++
There are two overloads:
You are trying to use this:
but there is no such signature, because the CLS prohibits overloads on reference specifiers. Use the overload with the out parameter instead.
Re: Vector3 Cross Operation for CLI/C++
Thanks, I figure out the problem through your feedbacks.