|
From: J. S. A. <js...@te...> - 2003-03-17 19:14:00
|
On Mon, 2003-03-17 at 00:37, Thomas Maier wrote:
> When asking such questions its best to include the program you tried to
> compile or even better an example as small as possible but still
> reproducing the same error. Fortunately this one seems like an easy one
> (for those who know :)). You're using Category's copy constructor which
> is private. That is, you can't write something like
>
> Category cat = Category::getInstance("some.name");
>
> because this tries to take the object (reference) i returned by
> getInstance() and construct a new oject cat from this object i, i.e.
> this operation uses the copy constructor. Instead write
>
> Category& cat = Category::getInstance("some.name");
>
> (note the & to say "cat is a reference to a Category object). BTW IIRC
> this question has already been answered either on this list or in one of
> the forums.
>
> HTH, Thomas.
Thanks very much for the response (and the advice) - this was indeed the
problem. Thanks again!
Scott
|