# Adding struct pointers to TMap gives different values from original struct

**URL:** <https://forums.unrealengine.com/t/adding-struct-pointers-to-tmap-gives-different-values-from-original-struct/1167940>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [May 16, 2023, 7:15pm UTC](https://forums.unrealengine.com/t/adding-struct-pointers-to-tmap-gives-different-values-from-original-struct/1167940 "2023-05-16T19:15:00Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [May 17, 2023, 9:20pm UTC](https://forums.unrealengine.com/t/adding-struct-pointers-to-tmap-gives-different-values-from-original-struct/1167940/15 "2023-05-17T21:20:45Z")

</div>

I found this thread. Maybe it’ll help.

> [@Correct way to get the value of a Property?](https://forums.unrealengine.com/t/correct-way-to-get-the-value-of-a-property/551897):
>
> Since the TProperty iterator uses a class as input, the Property still has to be pointed to an address to get its value from. Confusing design? Question: How to get the value address properly, or how to directly iterate properties on an object instead of its class? for (TFieldIterator\<FObjectProperty\> PropertyIterator(GetClass()); PropertyIterator; ++PropertyIterator) { FObjectProperty\* Property = \*PropertyIterator; UObject\* PropertyValue = Property-\>GetPropertyValue(this); }

---

_[View the full topic](https://forums.unrealengine.com/t/adding-struct-pointers-to-tmap-gives-different-values-from-original-struct/1167940)._
