ALM
October 20th, 1999, 09:54 AM
I use the auto_ptr template class in my code in several places. I'd like to use it without the std:: qualifier so I have two choices: 1, bring in the whole std namespace with the using directive; or 2, bring in just the auto_ptr class with the using declaration.
My question is, what's the proper way to do the second option? I've tried doing this:
#include <memory>
using std::auto_ptr<class T>;
This compiles fine but then when I say:
auto_ptr<CFile> pFile;
the compiler tells me: 'auto_ptr' : undeclared identifier.
What am I doing wrong?
Thanks,
Alvaro
My question is, what's the proper way to do the second option? I've tried doing this:
#include <memory>
using std::auto_ptr<class T>;
This compiles fine but then when I say:
auto_ptr<CFile> pFile;
the compiler tells me: 'auto_ptr' : undeclared identifier.
What am I doing wrong?
Thanks,
Alvaro