What is the Syntax for Arrays in C++

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Pulsarch

I don’t even know where to start to create an array variable of say:

Array arrayVariable = [0, 1, 2, 3];

Obviously this isn’t the syntax but that’s the simple thing I am trying to do, but I cannot figure out the syntax for it.

Ideally I would like to create an array of godot::Strings.

Array arrayOfStrings = [godot::String("variable1"), godot::String("variable2")...]

Remember it needs to be in the GDNative / C++ :confused:

Let me know if you guys know how to!!! Greatly appreciated!

:bust_in_silhouette: Reply From: Bernard Cloutier
Array arrayOfStrings{};