Confusion

When a function takes multiple parameters how can we know which parameters are not necessary?

Usually all parameters are necessary for the function to work and normally your code won’t even compile if it’s missing parameters, however some functions have multiple sets of parameters you can use, one for example being GetComponents. For those functions I suggest looking at the UE4 documentation to clarify what params you need and what you don’t.

One’s that have default arguments.

int square(int n = 3)
{
    return n * n;
}

int main()
{
    int value = square() // square(3)
}

Arguments can’t be skipped.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms