# What does this syntax do in C++?

**URL:** <https://forums.unrealengine.com/t/what-does-this-syntax-do-in-c/360496>\
**Category:** C++\
**Tags:** data, Struct, syntax, unreal-engine, CPP, question\
**Created:** [June 12, 2016, 7:41am UTC](https://forums.unrealengine.com/t/what-does-this-syntax-do-in-c/360496 "2016-06-12T07:41:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheeplie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sheeplie](https://forums.unrealengine.com/u/Sheeplie)\
**Post date:** [June 12, 2016, 7:41am UTC](https://forums.unrealengine.com/t/what-does-this-syntax-do-in-c/360496/1 "2016-06-12T07:41:52Z")

</div>

Taken from: [Data Driven Gameplay Elements | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/Gameplay/DataDriven/)

```
   FLevelUpData()
    : XPtoLvl(0)
    , AdditionalHP(0)
    {}

```

This is in the public area of a struct. I don’t seem to remember this type of syntax from C++, can anyone explain each line?

---

<div class="post-metadata">

**Author:** ![Jerry.Richards](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jerry.Richards](https://forums.unrealengine.com/u/Jerry.Richards)\
**Post date:** [June 12, 2016, 7:50am UTC](https://forums.unrealengine.com/t/what-does-this-syntax-do-in-c/360496/2 "2016-06-12T07:50:25Z")

</div>

That’s the constructor for the struct/class. In this particular case the default constructor, no parameters that is, is empty since no code exists between the opening/closing brases { . . . }

During the construction phase the two members, XPtoLvl and AdditionalHP, which are int32, are set to 0.

---

<div class="post-metadata">

**Author:** ![Sheeplie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sheeplie](https://forums.unrealengine.com/u/Sheeplie)\
**Post date:** [June 12, 2016, 8:30am UTC](https://forums.unrealengine.com/t/what-does-this-syntax-do-in-c/360496/3 "2016-06-12T08:30:13Z")

</div>

I see. I will have to look into that, thank you very much.
