diff --git a/eo/tutorial/html/eoProgramming.html b/eo/tutorial/html/eoProgramming.html index d5f90c30..7889a499 100644 --- a/eo/tutorial/html/eoProgramming.html +++ b/eo/tutorial/html/eoProgramming.html @@ -430,9 +430,9 @@ function. which gives something like
eoTournamentSelection<EOT> *ptSelect
= new eoTournamentSelection<EOT>(tSize);
-
eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(select);
+
eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(*ptSselect);
eoEasyAlgo<EOT> *ptAlgo = new eoEasyAlgo<EOT>(
-..., breed, ...);
+..., *ptBreed, ...);
and you can then use the dynamically allocated objects anywhere. But
the trouble with such a construct is that after exiting the function where
such objects are defined, you will never be able
@@ -451,10 +451,10 @@ to care of.
eoTournamentSelection<EOT> *ptSelect
= new eoTournamentSelection<EOT>(tSize);
state.storeFunctor(ptSelect);
-
eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(select);
+
eoBreeder<EOT> *ptBreed = new eoBreeder<EOT>(*ptSelect);
state.storeFunctor(ptBreed);
eoEasyAlgo<EOT> *ptAlgo = new eoEasyAlgo<EOT>(
-..., breed, ...);
+..., *ptBreed, ...);
state.storeFunctor(ptAlgo);
or, even more quickly (though less readably)
eoTournamentSelection<EOT> *ptSelect
@@ -463,10 +463,10 @@ to care of.
state.storeFunctor(new eoTournamentSelection<EOT>(tSize));
eoBreeder<EOT> *ptBreed =
-state.storeFunctor(new eoBreeder<EOT>(select));
+state.storeFunctor(new eoBreeder<EOT>(*ptSelect));
eoEasyAlgo<EOT> *ptAlgo =
-state.storeFunctor(new eoEasyAlgo<EOT>( ..., breed, ...));
+state.storeFunctor(new eoEasyAlgo<EOT>( ..., *ptBreed, ...));
In both the above code, state is an eoFunctorStore that is of course passed from outside the function - and it's called state because in most cases it will actually be an eoState.