title: What do these errors mean?
body: <p>I'm relatively new to C++, so I kind of glaze over when I see these monstrous template involving errors.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>#include "scene.hpp"
  #include &lt;map&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  #include &lt;algorithm&gt;
  #include &lt;functional&gt;
  
  // projects a ray from the eyepoint through (x, y) in the image plane
  Ray Camera::project_ray(int x, int y){
  }
  
  class scene_parser{
  public:
    class unimplemented_exception {};
    class unknown_command_exception {};
    class malformed_command_exception {};
  
    scene_parser(Scene &amp;s);
    void parse(const std::string &amp;filename);
  private:
    PixelBufferPTR current_texture;
    Colour current_material_colour;
    Material current_material;
  
    typedef void (scene_parser::*parsefunc )(std::vector&lt;std::string&gt;);
    std::map&lt;std::string, parsefunc&gt; funcMap;
    void init_funcMap();
    void apply_func(const std::vector&lt;std::string&gt; &amp;line);
  
    // methods which parse the scene file
    // they each receive a line of the file, tokenized on whitespace
    void camera_from(std::vector&lt;std::string&gt; line);
    void camera_target(std::vector&lt;std::string&gt; line);
    void camera_forw(std::vector&lt;std::string&gt; line);
    void camera_up(std::vector&lt;std::string&gt; line);
    void camera_angle(std::vector&lt;std::string&gt; line);
    void camera_resolution(std::vector&lt;std::string&gt; line);
  
    void sphere(std::vector&lt;std::string&gt; line);
    void tsphere(std::vector&lt;std::string&gt; line);
    void texture(std::vector&lt;std::string&gt; line);
    void mesh(std::vector&lt;std::string&gt; line) {throw unimplemented_exception();}
  
    void background(std::vector&lt;std::string&gt; line);
    void ambient_light(std::vector&lt;std::string&gt; line);
    void parallel_light(std::vector&lt;std::string&gt; line);
    void point_light(std::vector&lt;std::string&gt; line);
    void spot_light(std::vector&lt;std::string&gt; line) {throw unimplemented_exception();}
    void material(std::vector&lt;std::string&gt; line);
  
    void render(std::vector&lt;std::string&gt; line);
    void trace_depth(std::vector&lt;std::string&gt; line);
  };
  
  scene_parser::scene_parser(Scene &amp;s) : current_material_colour(0, 0, 0), current_material(0, 0, 0, 0, 0) {
    init_funcMap();
  }
  
  void scene_parser::init_funcMap(){
    funcMap["camera_from"] = &amp;scene_parser::camera_from;
    funcMap["camera_target"] = &amp;scene_parser::camera_target;
    funcMap["camera_forw"] = &amp;scene_parser::camera_forw;
    funcMap["camera_up"] = &amp;scene_parser::camera_up;
    funcMap["camera_angle"] = &amp;scene_parser::camera_angle;
    funcMap["camera_resolution"] = &amp;scene_parser::camera_resolution;
    funcMap["sphere"] = &amp;scene_parser::sphere;
    funcMap["tsphere"] = &amp;scene_parser::tsphere;
    funcMap["texture"] = &amp;scene_parser::texture;
    funcMap["mesh"] = &amp;scene_parser::mesh;
    funcMap["background"] = &amp;scene_parser::background;
    funcMap["ambient_light"] = &amp;scene_parser::ambient_light;
    funcMap["parallel_light"] = &amp;scene_parser::parallel_light;
    funcMap["point_light"] = &amp;scene_parser::point_light;
    funcMap["spot_light"] = &amp;scene_parser::spot_light;
    funcMap["material"] = &amp;scene_parser::material;
    funcMap["render"] = &amp;scene_parser::render;
    funcMap["trace_depth"] = &amp;scene_parser::trace_depth;
  }
  
  void scene_parser::apply_func(const std::vector&lt;std::string&gt; &amp;line){
    if(line.size() != 0){
      std::map&lt;std::string, parsefunc&gt;::iterator it = funcMap.find(line[0]);
      if(it == funcMap.end()) throw unknown_command_exception();
      else{
        parsefunc f = it-&gt;second;
        this-&gt;*f(line); //line 86
      }
    }
  }
  
  void scene_parser::parse(const std::string &amp;filename){
    std::vector&lt;std::string&gt; lines = tokenize_string(file_to_string(filename), "\n");
  
    std::vector&lt;std::vector&lt;std::string&gt; &gt; tokenized_lines;
    tokenized_lines.resize(lines.size());
  
    std::transform(lines.begin(), lines.end(), tokenized_lines.begin(), tokenized_lines.end(), std::bind2nd(std::ptr_fun(tokenize_string), std::string(" "))); //line 97
  
    std::for_each(tokenized_lines.begin(), tokenized_lines.end(), std::mem_fun(&amp;scene_parser::apply_func)); //line 99
  }
  </code></pre>
  
  <p>and this is tokenize_string</p>
  
  <pre><code>std::vector&lt;std::string&gt; tokenize_string(const std::string &amp;s, const std::string &amp;split_chars);
  </code></pre>
  
  <p>and here are the errors:</p>
  
  <pre><code>Scene.cpp: In member function ‘void scene_parser::apply_func(const std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;&amp;)’:
  Scene.cpp:86: error: must use ‘.*’ or ‘-&gt;*’ to call pointer-to-member function in ‘f (...)’, e.g. ‘(... -&gt;* f) (...)’
  In file included from /usr/include/c++/4.4/bits/stl_function.h:712,
                   from /usr/include/c++/4.4/memory:66,
                   from light.hpp:4,
                   from Scene.hpp:4,
                   from Scene.cpp:1:
  /usr/include/c++/4.4/backward/binders.h: At global scope:
  /usr/include/c++/4.4/backward/binders.h: In instantiation of ‘std::binder2nd&lt;std::pointer_to_binary_function&lt;const std::string&amp;, const std::string&amp;, std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt; &gt;’:
  Scene.cpp:97:   instantiated from here
  /usr/include/c++/4.4/backward/binders.h:152: error: ‘typename _Operation::result_type std::binder2nd&lt;_Operation&gt;::operator()(typename _Operation::first_argument_type&amp;) const [with _Operation = std::pointer_to_binary_function&lt;const std::string&amp;, const std::string&amp;, std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;]’ cannot be overloaded
  /usr/include/c++/4.4/backward/binders.h:146: error: with ‘typename _Operation::result_type std::binder2nd&lt;_Operation&gt;::operator()(const typename _Operation::first_argument_type&amp;) const [with _Operation = std::pointer_to_binary_function&lt;const std::string&amp;, const std::string&amp;, std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;]’
  In file included from /usr/include/c++/4.4/algorithm:62,
                   from Scene.cpp:5:
  /usr/include/c++/4.4/bits/stl_algo.h: In function ‘_OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation) [with _IIter1 = __gnu_cxx::__normal_iterator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;*, std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;, _IIter2 = __gnu_cxx::__normal_iterator&lt;std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;*, std::vector&lt;std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, std::allocator&lt;std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt; &gt; &gt;, _OIter = __gnu_cxx::__normal_iterator&lt;std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;*, std::vector&lt;std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, std::allocator&lt;std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt; &gt; &gt;, _BinaryOperation = std::binder2nd&lt;std::pointer_to_binary_function&lt;const std::string&amp;, const std::string&amp;, std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt; &gt;]’:
  Scene.cpp:97:   instantiated from here
  /usr/include/c++/4.4/bits/stl_algo.h:4741: error: no match for call to ‘(std::binder2nd&lt;std::pointer_to_binary_function&lt;const std::string&amp;, const std::string&amp;, std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt; &gt;) (std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;&amp;, std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;&amp;)’
  /usr/include/c++/4.4/backward/binders.h:146: note: candidates are: typename _Operation::result_type std::binder2nd&lt;_Operation&gt;::operator()(const typename _Operation::first_argument_type&amp;) const [with _Operation = std::pointer_to_binary_function&lt;const std::string&amp;, const std::string&amp;, std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;]
  /usr/include/c++/4.4/bits/stl_algo.h: In function ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator&lt;std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;*, std::vector&lt;std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, std::allocator&lt;std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt; &gt; &gt;, _Funct = std::mem_fun1_t&lt;void, scene_parser, const std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;&amp;&gt;]’:
  Scene.cpp:99:   instantiated from here
  /usr/include/c++/4.4/bits/stl_algo.h:4200: error: no match for call to ‘(std::mem_fun1_t&lt;void, scene_parser, const std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;&amp;&gt;) (std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;&amp;)’
  /usr/include/c++/4.4/bits/stl_function.h:604: note: candidates are: _Ret std::mem_fun1_t&lt;_Ret, _Tp, _Arg&gt;::operator()(_Tp*, _Arg) const [with _Ret = void, _Tp = scene_parser, _Arg = const std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;&amp;]
  </code></pre>
  
  <p>It was compiled with gcc 4.4 on Ubuntu 10.10.</p>
  
  <p>I'd be grateful for any insight.</p>