How can set a constant string to a reference of string?

85 views
asked Aug 8, 2017 in GUI Development by linglongzhu
A reference of string is defined in a class. How can set  a constant string to the reference by the IDE?

1 Answer

0 votes
answered Aug 8, 2017 by Paul Banach
 
Best answer

Hello,

do you mean with constant string the constant member intended to store a string value?

In such case, constant strings can't be changed. The initialization value of a constant has to be a constant expression (in case of a string this can be a literal like "hello world"). Initializing a constant with a value defined within a class is not possible.

Best regards

Paul Banach

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...