NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

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.

Possible cause

Example

class A
{
   int i;
   int j = i;  // error, access outside function
   void setj( void ) { j = i ; }  // OK, access in function
   A( int ai )
   {
      i = ai;  // OK, initializes i and j
      j = i;
   }
} a( 1 );