नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'value type' : cannot dynamically allocate this value type object on native heap
Remarks
Instances of a value type (see Classes and Structs) that contain managed members can be created on the stack but not on the heap.
Example
The following example generates C3255:
// C3255.cpp
// compile with: /clr
using namespace System;
value struct V {
Object^ o;
};
value struct V2 {
int i;
};
int main() {
V* pv = new V; // C3255
V2* pv2 = new V2;
V v2;
}