I want to use char type to store a single character, but LiveCoding tells me “unrecognized type ‘TCHAR’ - type must be a UCLASS, ustruct, uenum, or global delegate.”.
What should I do? What class does USTRUCT support?
In general, a single code point (which is what TCHAR is) isn’t enough to store a single symbol (which is the minimum useful increment in a language.)
There are languages that need combining characters to create a specific symbol, so a single TCHAR is not enough.
If you’re writing a large text processing program, and need to store individual code points, then, perhaps, a FString for each would be enough waste that you could measure the overhead. However, if you’re storing some symbol for a shortcut, key binding, or similar, not only is an FString (or perhaps FText, if you want localization) necessary to be able to represent all possible symbols, the overhead is also not really measurable in practice.
If you have less than 10,000 instances of this object, don’t worry about it at al. If you have more than 10,000 instances of this object, then start profiling whether optimization is needed.