• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# new problems with array of pointers

## Recommended Posts

##### Share on other sites
  //read in bitmap hInTSet.read(reinterpret_cast (&TileCache[World.iTileIndex[j]]), THeader_t.lEntrySizes[World[i].iTileIndex[j]]);

The problem is this: &TileCache[...] . Since memory is allocated where TileCache[...] points, not where it resides, you don''t want the address-of operator for this expression. Remove the & and all should be fine.

What''s happening is that you''re reading directly into where &TileCache[...] is stored, so the memory you just allocated with it is lost, and it now points to some bogus memory location, and the debugger tries to read from there, and can''t. I''m assuming that TSetEntry is some sort of structure, so the debugger probably can''t make sense of what it''s reading at the new address.

Hope this helps.