title: Passing values to atexit
body: <p>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...</p>
  
  <p>In c++ I am trying to get the following to work:</p>
  
  <p>Function Definition</p>
  
  <pre><code>static void closeAnimation(string prefix="");// static member of fileWriter
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>atexit(boost::bind(fileWriter::closeAnimation, "0")); // I want to first prefix to be "0"
  </code></pre>
  
  <p>The error: </p>
  
  <pre><code>cannot convert ‘boost::_bi::bind_t&lt;void, void (*)(std::basic_string&lt;char&gt;), boost::_bi::list1&lt;boost::_bi::value&lt;const char*&gt; &gt; &gt;’ to ‘void (*)()’ for argument
  </code></pre>
  
  <p>Thanks in advance!</p>