---
name: "Array+="
type: topic
source: https://community.bistudio.com/wiki/Array%2B%3D
revid: 373440
updated: 2025-05-08T11:27:12Z
---

# Array+=

Arma 3 v0.50 same-file support\
Arma 3 v1.00 full support

The `array[] += {}` syntax allows to add items to an existing array inherited from the direct parent.

> [!IMPORTANT]
> - This syntax has limitations in inheritance - see [Limitations](../topics/Array~2B~3D.md#limitations).
> - This syntax should **not** be used in [Description.ext](../topics/Description.ext.md) - only in modded [config.cpp](../topics/Config.cpp~2Fbin_File_Format.md).

### Usage

```cpp
class A
{
    array[] = { any, thing };
};

class B : A
{
    array += { more, Bstuff };
};

class C : A // inherits from A, -not- B
{
    array += { other, Cstuff };
};
```

### Limitations

Only **direct inheritance** of an explicitly-stated array works. The following cases do **not** work:

|  |  |
|---|---|
| ```cpp<br>class A { array[] = { any, thing }; };<br>class B : A {};<br>class C : B // inherits from B which inherits from A (without changes)<br>{<br>    array[] += { wont, work }; // result: array[] = { wont, work };<br>};<br>``` | ```cpp<br>class A { array[] = { any, thing }; };<br>class B : A { array[] += { more, stuff }; };<br>class C : B // inherits from B which inherits from A (with += changes)<br>{<br>    array[] += { wont, work }; // result: array[] = { wont, work };<br>};<br>``` |

<sub>Source: [BI Community Wiki — Array+=](https://community.bistudio.com/wiki/Array%2B%3D) (revision 373440).</sub>
