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 C2534

'identifier' : constructor cannot return a value

A constructor cannot return a value or have a return type (not even a void return type).

Possible solution

The following sample generates C2534:

class A {
public:
   int i;
   A() {
      i = 1;
      return i;   // C2534, remove the return to resolve the error
   }
};

void main() {
}