Does anyone know if it is possible to pass an optional auto_ptr to a function? I want to pass in an auto_ptr to a file handle sometimes, but not others. My code looks like the following
Then later when the function is declared I want to check if it is NULL or not. But it is not working. Any suggestions??Code:void generateTree(PhyloTree* tree, auto_ptr<ofstream>& file = NULL);
Thanks
Mark