I would like to pass a variable pointer that has
been instantiated using 'auto_ptr' to a class method, however, the compiler
complains saying that it does not recognize the method call; gives me a number
of options, basically the list of overloaded methods. So my question is, what is
the proper way to pass 'auto_ptr('s)' to a method?
class MyClass{
private: std::string str*
public:
MyClass(){
std::auto_ptr<std::string> str(new std::string("unknow"));}
MyMethod(const
std::string& s){ str = s;} // <== Error??
..........
}
main(){
std::string temp*
std::auto_ptr<std::string>
tmp(new std::string("hey!"));}
MyClass mc();
mc.MyMethod(temp); // <<--
Error??
...
}
|
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list