I don't understand what means OUT

I don’t understand what is “OUT” word. How it works and what it means. If I write GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorLocation(), I get A player location, and I get why. But I don’t understad how works GetWorld()->GetFirstPlayerController()->GetPlayerViewPoint(); Please can you explain that.

OUT does absolutely nothing.

#define OUT

Means replace occurances of OUT with nothing.


GetPlayerViewPoint use output parameters which just a way to “return” multiple values from a function. The variables are just passed by reference e.g.

void SetOneTwo(int& A, int& B)
{
    A = 1; B = 2;
}

int main()
{
    int Val1;
    int Val2;
    SetOneTwo(Val1, Val2);
    //Val1 == 1, Val2 == 2
}
1 Like

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

Privacy & Terms