someVariable = { somethingThatLooksLikeAFunction }; possible?
You can do it with a lambda function, though the syntax is somewhat cryptic:

int someThing = [](int y, int z, int a, int b){
    for (int _x = 0; _x &lt; y; _x++) {
        z++;
    }
    return (z &gt; y) ? a : b;
}(100, 0, 10, 20);


In that you are defining a lamda function [] with four parameters, y, z, a and b. Then calling that function with four numbers (100, 0, 10, 20) and assigning the return value to someThing.

It's the same as writing a normal function but there's a lot more brackets around.