Page 1 of 1

Strange error DevCPP Irrlicht 0.12

Posted: Mon Nov 14, 2005 12:01 pm
by Guest
What does this error message mean?

comparison between distinct pointer types `irr::scene::ISceneNode*' and `irr::scene::ISceneNode**' lacks a cast


Here some code:

Code: Select all


scene::ISceneNode* Mesh1;
scene::ISceneNode* Mesh2;
if(Mesh1 == Mesh2)
[/i]

Posted: Mon Nov 14, 2005 12:52 pm
by Guest
komm schon, bidddeee!
Ich brauch hilfe.
Irgenteiner wird doch ne Lösung haben.

Posted: Tue Nov 15, 2005 12:25 pm
by bearSoft
an equallity resolvement needs an opperator overload. eg there is no opperator for '==' for ISceneNode*
..the error message is though rather cryptic, but i am -pretty- sure its the opperator that is the problem. No solution :(

nb the prefered language on this forum is english.
also -Do take the time to sign up

Re: Strange error DevCPP Irrlicht 0.12

Posted: Tue Nov 15, 2005 12:36 pm
by hybrid
Anonymous wrote:What does this error message mean?

comparison between distinct pointer types `irr::scene::ISceneNode*' and `irr::scene::ISceneNode**' lacks a cast


Here some code:

Code: Select all


scene::ISceneNode* Mesh1;
scene::ISceneNode* Mesh2;
if(Mesh1 == Mesh2)
Now, the error means that you compare pointers with pointers to pointers. But the code provided would never issue such an error. Either you'd declare one of the variables as ISceneNode** MeshX, or you'd use (&Mesh1 == Mesh2). Both would be wrong, but your code did not expose this.
And please, take some time. Complaining after less than an hour is :evil: ! If you have some deadline - that's your fault. If you just can't proceed - read a C++ book which could help with this or similar problems.