Compiler Error C2654
'identifier' : attempt to access member outside a member function
A member is accessed in a declaration. Member data can be accessed only in member functions.
This error can be caused when trying to initialize variables in a declaration. Use a constructor for this purpose.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for