Why TEXT(" ")isn't needed here?

Hey, I just have a simple question regaring to this line of code here.

Question:
As far as I am concered, I am getting an FString out of the function and assigning it to “HiddenWord”.
Why don’t I need to put TEXT (" ")in front of the result?(I did try and the system is preventing me from doing that)

Because the TEXT macro is for string literals only. The purpose is to ensure the string literal is of the correct type for the target platform for native Unicode support, on Windows that would be wchar_t[N]

"hello"  // const char[6]
L"hello" // const wchar_t[6]

So that is all the TEXT macro does on Windows, it prepends an L

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

Privacy & Terms