Hey, handsome bros.
I spent the whole afternoon studying this problem, but i havn’t solved it.Pls help me.
Here is my code
MainWidget.h
UCLASS()
class SCHOOLOBJECT_API UMainWeight : public UUserWidget
{
GENERATED_BODY()
protected:
virtual void NativeConstruct() override;
public:
UPROPERTY(meta = (BindWidget))
UComboBoxString* CollisionStrategyComboBox;
}
MainWidget.cpp
void UHashTableWidget::NativeConstruct()
{
Super::NativeConstruct();
const FString ST = TEXT("线性预测");
CollisionStrategyComboBox->AddOption(ST);
//CollisionStrategyComboBox->AddOption("线性预测");
//CollisionStrategyComboBox->AddOption(TEXT("线性预测"));
//CollisionStrategyComboBox->AddOption(FString("线性预测"));
//CollisionStrategyComboBox->AddOption(FString(TEXT("线性预测")));
}
When build the game in VS
sometimes:
error C2001: Newline in constant
fatal error C1903: Cannot recover from previous error; compilation is stopped
or sometimes:
error C2001: newline in constant
error C2146: syntax error: missing ‘)’ before identifier ‘CollisionStrategyComboBox’
error C2146: syntax error: missing ‘;’ before identifier ‘CollisionStrategyComboBox’
or somtimes:
Fatal error C1001: Internal compiler error.
somtimes some characters can accept,but the same code build twice, it will failed.But the same logic with english could accept.Could you tell me why it occur and how to solve it.
Thanks you very much!!! >_<