# Can you make 2D arrays in C++? If so, how?

**URL:** <https://forums.unrealengine.com/t/can-you-make-2d-arrays-in-c-if-so-how/466261>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 4, 2020, 10:48pm UTC](https://forums.unrealengine.com/t/can-you-make-2d-arrays-in-c-if-so-how/466261 "2020-06-04T22:48:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Ardomation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ardomation](https://forums.unrealengine.com/u/Ardomation)\
**Post date:** [June 4, 2020, 11:44pm UTC](https://forums.unrealengine.com/t/can-you-make-2d-arrays-in-c-if-so-how/466261/2 "2020-06-04T23:44:59Z")

</div>

If you mean a multidimensional array, I believe you can if you don’t plan on exposing them in the editor using `UPROPERTY()`. Otherwise if you are using it purely in C++ I think you can do something like `TArray<TArray<int>> foo;`

Otherwise if you need to expose them to the editor, the closest thing I could find was using a struct.

---

_[View the full topic](https://forums.unrealengine.com/t/can-you-make-2d-arrays-in-c-if-so-how/466261)._
