Issues using C++ in UE4, Array types error

Hello everyone,
I am looking for some help for my Unreal Engine project. I am trying to implement the Merge Mesh example, given by the Unreal Documentation, for my modular mesh.

This documentation explain how to create a C++ file that allow us to call a node to merge some mesh in one in Blueprint. It give all the C++ code that is necessary to do it but I have many issues when compiling.

My errors are related to the array type. Each time that there is an array in the code, it says me that we have an error link to the type or things like that.

You can see the complete code here in the section “Merge Mesh Example” : Working with Modular Characters | Unreal Engine Documentation

The problem is with each lines that is using an array, for example the following line in the first struct :

TArray SectionIDs;

It says me that it doesn’t know the type named “Type” and that I should use : USTRUCT, UENUM or UCLASS.

I tryed with USTRUCT, thinking that since I am in a struct it could be this type. But it was not working and I would like to understand well the problem so I prefered to ask to someone.

All other lines with TArray are causing troubles. Other lines haven’t any types and are written like this for example :

TArray UVTransforms;

I didn’t know that we can declare an array like this… And the compilator says me that the “<” with the type inside is missing so… I don’t understand why the code is written like this.

It is my first C++. I used C++ long time ago but not in Unreal Engine so I tried many things but don’t manage to solve the errors. I prefered to ask you since I would like to understand what I am doing… And it is quite weird that the code providing in the documentation doesn’t work. Maybe I am doing something wrong ?

Thank you in advance for your help and sorry for my bad english.

All the best

Arrays in Unreal engine are declared a bit differently from the generic C++ way

Usage : TArray <ComponentType> ArrayName;

Here is an example if you want to create an array of static meshes.

Example : TArray <UStaticMesh*> MyMeshes;

Ok, thank you for your answer !
But in this case I don’t understand why the Documentation is like this… They don’t declare array as you said… What should I do ? Because I have no idea the type it should be. I have tried to guess but… It is really strange and I don’t want to do bad things.
Would someone help me to understand better the little code in the documentation ? Then I think I will be able to understand better C++ in Unreal Engine. I think I understand something badly.

Thank you a lot again for your answer !

Hello, same question here, did you find the solutions? Thanksss