Hey guys,
I was wondering if anybody knew of a method to check if an element in a object array was empty.
for example, lets say I have the class "XYZ"
class XYZ
{
int x;
string y;
};
then in main if i declared the object array:
int main()
{
XYZ ar[10];
return 0;
}
is it possible to check if a part of that array is empty?
for example:
for(int i = 0; i < 10; i++)
{
if(ar[i].x != NULL) //is there anyway to make this comparison?
{ //CODE HERE }
}