All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.
You are right. It doesn't have to be an int but can be any integral type i.e. int, byte, char, or short. As long as the value value of the constant expression is representable in the target type of the variable, it can be implicitly narrowed to the target variable.
I have updated the explanation.
thank you for your feedback!
Paul.
If you like our products and services, please help us by posting your review here.