How do I set Default Value for a member variable in C++?

Hi,
So, if I create a variable in BP, under Details there is the Default Value that we can specify. If this is a var that is Instance Editable, and its value is changed, a small icon appears that allows to reset it to the default value.

Zrzut ekranu 2026-04-03 152745

How do I do that in C++? To make my question clear: what do I do with the variable in C++, if I want it to have a default value and when this value is changed, I want this ‘reset to default value arrow’ icon to appear in BP.

If that matters, my C++ class variable is of a UStruct type that contains some bool as well as FSlateBrush variables. I would like these variables to have default values.

:thinking: Just specify the default value in the code (?)

UPROPERTY(BlueprintReadWrite, EditAnywhere)
int MyVar = 100500;

(post deleted by author)