Yes, sorry iterator. Just trying to get they app to compile on the new compiler and don't want to remove code completely. Any way of checking if the iterator is NULL?
Yes, sorry iterator. Just trying to get they app to compile on the new compiler and don't want to remove code completely. Any way of checking if the iterator is NULL?
I think you have taken iterator as a variable and then trying to compile this. Can you paste your code snippet here? Also paste errors if getting any.
int main()
{
NumberedFieldMa p::iterator m_CurrentField;
if ( m_CurrentField != NULL )
{
cout << "m_CurrentF ield not is NULL" << endl;
}
else
{
cout << "m_CurrentF ield is NULL" << endl;
}
char c = getch();
return 0;
}
I'm not getting any errors as I'm using VC6, but the guy asking me to look at it is using VC8. Something about no conversion for left hand operator. Cant exactly remember the error.(should have written it down) Maybe someone here came accross the same problem.
All I actually want to know is can I check if a iterator is NULL. Or is the end() function enough. What if it's trying to get an value out of the scoupe? This is critical code so, I don't want to take any chances.
Comment