Compiler Warning (level 1) C4183 (Windows CE 5.0)

Send Feedback

'identifier' : member function definition looks like a ctor,
but name does not match enclosing class

The inline definition of a member function in a class or a structure looks like a constructor, but the name of the member function does not match the class or structure name enclosing it. This member function is assumed to have a default return type of int.

The following example shows how this error might occur.

class MyClass1;
class MyClass2 {
MyClass1() {...};
}

The member function MyClass1() is treated as int MyClass1(), not as the constructor for MyClass1.

Make sure the constructor of this class is not misspelled. Misspelled constructors can lead to run time errors that are hard to isolate. If this member function is not intended to be a constructor, you can avoid this warning by explicitly specifying the return type of the member function.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.