How to create / call and read data from a struct in C++?

I want to Create a data table in C++ and read data from it under C++. I searched it a lot on google but not found any solution.

Visual Example:

Hello

I don’t think you can create a Data Table directly in C++ but you can reference one with ConstructorHelpers::FObjectFinder

This resource may be helpful for you: Unreal Engine C++ Fundamentals – DataTables – Jolly Monster Studio

1 Like

I am watching this video, if it solve my problem, I will obviously accept your answer )

To do this you don’t really need a datatable, you could just use a TArray of structs or a TMap if you want to index it (very useful if you need to find a precise row).

The advantage of these data types is that you can read and write them from C++, and it’s even easier to read from them

3 Likes

This solved the issue and explained few things in very details which gives me the idea how to implement it in C++, I will post more questions on this topic when I will come into problem.

I don’t have any idea about them to achieve my goal actually the example I show in the picture.
I could learn it if I found any example to the point, I will still be looking for more solutions to on this. Please post the short sample in code according to the picture using TArray , or TMap so I can learn from it, Thank you )