In normal c++ there are pointers which are indicated with a NULL if they are not pointing to any object.
class* object1 = NULL; //NULL is a special value that indicates
//that the pointer is not pointing to any object.
if(object1 == NULL) {
cout << "the pointer is not pointing to any object" << endl;
}
else {
cout << "the pointer is pointing to any object" << endl;
}
So how would that look like with C++/CLI Handles? I have found this on the internet. Can someone tell me if im right about this?
class^ object2 = nullptr;
if(object2 == nullptr){
cout << "the pointer is not pointing to any object" << endl;
}
else {
cout << "the pointer is pointing to any object" << endl;
}