BorlandDave
Programmer
I am comparing two pointers. When debugging they both contain the same address (both 00E2A7DC), but my comparison doesn't return true. Why not?
Code:
Graphics::TBitmap* Image1;
Image1 = new Graphics::TBitmap;
//point 'image1' to first image in 'ImageList1'
ImageList1->GetBitmap(0, Image1);
//add an item to my list box with Image1 as an object
ListBox1->Items->AddObject("test1",Image1);
//perform comparison between the two pointers
if(ListBox1->Items->Objects[0] == Image1){
//never gets here!
}