C++ equivellant to if <> Self

BlitzMax Forums/BlitzMax Programming/C++ equivellant to if <> Self

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

	Function DrawAll()		
			
			Local ThisSprite:Sprite				
				
			' Draw sprites.
				For ThisSprite = EachIn SpriteList
					ThisSprite.Draw()
				Next
			
		End Function



I don't code in C++, but if I understand you right, you're doing a loop like that, but in a method instead of a function?

If that's the case, then I think all you need is to say If ThisSprite <> Self.


[edit]
I think I misunderstood you though. You're trying to do this with generic objects, like those the List type works with. So it's not as simple as that. In that case I can't help ya, I don't do that sort of thing much.
[/edit]