T
Ted
I have the following code:
class test
{
public:
test();
test(const test & x);
test(test &x, char *szfile="test.dat");
}
I am using Visual C++ Net 2003 to compile the code. I get the
following warning message:
warning C4521: 'test' : multiple copy constructors specified
This message indicates that it will use the first copy constructor and
ignore the rest.
I found that if I don't specify a default value for szfile then the
compiler doesn't generate the warning, i.e. test(test &x, char
*szfile);
Is there anyway to get around this problem? I still want to specify a
default value for szfile.
Thanks,
Ted
class test
{
public:
test();
test(const test & x);
test(test &x, char *szfile="test.dat");
}
I am using Visual C++ Net 2003 to compile the code. I get the
following warning message:
warning C4521: 'test' : multiple copy constructors specified
This message indicates that it will use the first copy constructor and
ignore the rest.
I found that if I don't specify a default value for szfile then the
compiler doesn't generate the warning, i.e. test(test &x, char
*szfile);
Is there anyway to get around this problem? I still want to specify a
default value for szfile.
Thanks,
Ted