If FString ObjectName = GetOwner().GetName();
here ObjectName as ben said is pointer to string which is name of that owner. But if its pointer to string shouldn’t it be FString *ObjectName
and not FString ObjectName
?
UE_LOG(LogTemp, Warning, TEXT(Position Report reporting for duty on %s), *ObjectName)
Ben told that FString is for string. To print it we should have passed the base address with ObjectName
printf("%s", ObjectName);
or in case of C++ we have
printf("%s", ObjectName.c_str());
??? I am confused by what is FString ObjectName(is it string or pointer to String?)
If its a pointer to string than why don’t we have FString *ObjectName
. Also out of curiosity does FText has also same behaviour?