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 C2571

'function' : virtual function cannot be in union 'union'

A union is declared with a virtual function. You can declare a virtual function only in a class or structure.

Possible solutions

The following sample generates C2571:

union A {
   virtual void func1();   // C2571, remove virtual to resolve the error
};

void main() {
}