tester.hpp
~~~~~~~
// My Class
#include "pulldownmenu.hpp"
//STD
#include <memory>
class Tester {
public:
Tester();
~Tester();
private:
PulldownMenu* pdm;
};
tester.cpp
~~~~~~~~
Tester::Tester(){
std::auto_ptr<PulldownMenu> pdm(jPulldownMenu);
}
Tester::~Tester(){}
=====
However, I have seen examples where the pointer is declared and
instantiated in the header file, i.e.
class Tester {
public:
Tester();
virtual ~Tester();
private:
std::auto_ptr<jme::PulldownMenu> pdm(jme::PulldownMenu);
};
=======
What difference does it make? the two ways compile OK!
pls go easy on me, I am new a this auto_ptr thing... :)