;; If you want to create a file, first visit that file with C-x
C-f,
;; then enter the text in that file's own buffer.
Luigi,
Daniel
thank you very much for your help. Indeed I was not aware of
the
infamous "C++ most vexing parse" :)
Now, following Luigi's suggestion,
it works correctly.
Regarding Daniel's issue:
>NOW, here are
some results:
>
>1. If you create a default constructor everything
is OK
>2. If no default constructor but there is another one, then we get
a compiler
>error
>3. If there are no constructors then compiler
generates one
Indeed I noticed the same behavior when playing with my
code, trying
to get around the problem related to the vexing parse. But I
guess it
is again related to the issue of the c++ most vexing
parse.
suppose I write:
BoxMullerGaussianRng<MersenneTwisterUniformRng>
generator(MersenneTwisterUniformRng() );
Sample<Real> currentSample = generator.next();
The compiler signals
an additional error saying that there is no
appropriate default constructor.
Indeed if you add a default
constructor in the Sample<> class this last
error disappears,
but the preceding one ("error C2228: left of '.next' must
have
class/struct/union type") still remains.
I don't know the hidden
reason behind this behavior; unfortunately I'm
not a C++ guru, otherwise I
should have known of the C++ most vexing
parse :)
Ciao,
grazie
Luca
__________________________________________________________________
Tiscali
Adsl 2 Mega Free, 2 Mega GRATIS!
Attiva Tiscali Adsl 2 Mega Free entro il 31
gennaio e navighi GRATIS
fino al 31 marzo 2005! In piu', anche il costo di
adesione e' GRATIS.
Scaricato il concetto? http://abbonati.tiscali.it/adsl/
| Free forum by Nabble | Edit this page |