Can I use switch case in C++ with FString?
Hi, I'm making XML parsing code with FXmlNode. I want to iterate through GetChildrenNodes(), and use switch-case with FString which is return value of FXmlNode::GetTag(). Is there someway to do that? Or should I use
asked Sep 12 '17 at 06:04 AM in C++ Programming
Well no, it is a limitation from FString, and every string type in UE, but you can use a trick, you can make a TArray with FNames from your FStrings, then set a number for everyone, and then get every number in the switch, but to be honest just use if and else, is less annoying.
Follow this question
Once you sign in you will be able to subscribe for any updates here