0

I currently have an auto_ptr:

auto_ptr<ClassA> classA_;

How can I check whether classA_ points to something or not. If I do:

if (classA_ == NULL)

to check if its pointing to NULL, it is giving a compile error: error: no match for 'operator==' in 'classA_ == 0'

Thank you.

Romonov
  • 8,145
  • 14
  • 43
  • 55

1 Answers1

0

What about

classA_.get() == 0

?

Pavel Strakhov
  • 39,123
  • 5
  • 88
  • 127