boost::scoped_ptr question

In my linux cpp file I have the following:

boost::scoped_ptr<int> ptr;

but I get the error:
:172: error: ISO C++ forbids declaration of ‘scoped_ptr’ with no type
:172: error: invalid use of ‘::’
:172: error: expected ‘;’ before ‘<’ token

Why is this and how can I fix it?
Who is Participating?
evilrixConnect With a Mentor Senior Software Engineer (Avast)Commented:
Did you include the header for boost scoped_ptr?If so, can you show the actual code?
LearnerManAuthor Commented:
re: Did you include the header for boost scoped_ptr?
oops my bad!
evilrixSenior Software Engineer (Avast)Commented:
It happens :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.