ReoSoft
April 14th, 2004, 11:46 AM
I am new to the C++ language. I have been a VB programmer for the last 6 years. My question is about checking to see if an object has been instantiated.
In the world of VB, it is possible to see if an object has been instantiated with:
Dim myDatabase as Database
If myDatabase Is Nothing
//The database object is not present...don't need to do anything
Else
// The database object is instantiated...perform action like opening
End If
Does C++ .NET have something available to check to see if an object variable has been instantiated? Or do I have to set flags to maintain the state of objects?
Thanks,
Reo
In the world of VB, it is possible to see if an object has been instantiated with:
Dim myDatabase as Database
If myDatabase Is Nothing
//The database object is not present...don't need to do anything
Else
// The database object is instantiated...perform action like opening
End If
Does C++ .NET have something available to check to see if an object variable has been instantiated? Or do I have to set flags to maintain the state of objects?
Thanks,
Reo