M
Marcel Müller
My compiler (gcc 3.3.5) complains to have no copy constructor for C in
the code below.
Is it really true that function arguments can only be supplied by the
copy constructor and not any other constructor?
By the way, a by far older compiler from IBM Visual Age 3.0 eats it.
Marcel
class C
{private:
C(const C&);
void operator=(const C&);
public:
C(int);
};
void foo(C c)
{
}
int main()
{ foo(7);
}
the code below.
Is it really true that function arguments can only be supplied by the
copy constructor and not any other constructor?
By the way, a by far older compiler from IBM Visual Age 3.0 eats it.
Marcel
class C
{private:
C(const C&);
void operator=(const C&);
public:
C(int);
};
void foo(C c)
{
}
int main()
{ foo(7);
}