<bl**********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
I have
class Foo
{
...
...
//copy constructor
Foo(const Foo<T>& F, int size=F.size())
{
..
..
}
and get this error
error: `F' was not declared in this scope
Any solution to this?
I'm not sure if there's a *neat* solution to that, but I've got *a*
solution...
I'd guess that size can't be negative, right? How about
:
Foo( const Foo<T>& F, int size = -1)
{
if (size < 0)
size = F.size();
...
}
Would that work for you?
-Howard