I want to push a series of clean up functions as they are needed. I was using atexit to do this for one cleanup function without any parameters, but I am not sure how to expand this approach to more then one clean up function. I am not very familiar with boost::bind, but assumed it would be a good idea as that is how I binded my functions to threads...
In c++ I am trying to get the following to work:
Function Definition
static void closeAnimation(string prefix="");// static member of fileWriter
Code:
atexit(boost::bind(fileWriter::closeAnimation, "0")); // I want to first prefix to be "0"
The error:
cannot convert ‘boost::_bi::bind_t<void, void (*)(std::basic_string<char>), boost::_bi::list1<boost::_bi::value<const char*> > >’ to ‘void (*)()’ for argument
Thanks in advance!