Especially when you are trying to generate a vector (or whatever std container) with a class that has several member variables. I believe that I need to feed the generate function a class that overloads operator(). I've got the following code...
I, however, get an error message when I call generate. It is:
C:\Dev-Cpp\include\c++\3.4.2\bits\stl_algo.h In function `void std::generate(_ForwardIterator, _ForwardIterator, _Generator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<PancakeGlutton*, std::vector<PancakeGlutton, std::allocator<PancakeGlutton> > >, _Generator = GenClass]':
46 C:\fac\pancakeGlutton.cpp instantiated from here
I got it. For anyone else interested. I needed to return a PancakeGlutton from the operator() overload, not void. Also there were a few logic errors that I had to work out. Funny how after thinking about it for a day, then posting, then it pops into my head. So it goes.