Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

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

Windows CE 5.0
Send Feedback

'object' : you cannot declare a pointer to a 'managed' class or interface

Pointers are not permitted when creating objects from managed classes. Your code was compiled as if the * operator was not used, which means that a reference is created. However, it is still up to you to assign that reference to a valid object.

For example, the following managed code generates C4831:

class X {
   void mf() { }

void f() {
    X *pX;// C4831..use X pX;


void main () { 

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.

© 2015 Microsoft