Article ID: 115521
Article Last Modified on 7/5/2005
/* Compile options needed: none
*/
#include <iostream.h>
class aClass
{
private:
int i;
aClass(const aClass& x) { cout << "private copy constructor" <<
endl; };
public:
aClass(int j) : i(j) {};
};
int func(aClass x) { return 0; };
int main(void)
{
int n;
aClass a(1);
n = func(a); //Copy constructor gets called anyway.
return 0;
}
Additional query words: kbVC400bug 8.00 8.00c 9.00
Keywords: kbbug kbfix kbvc500fix kbcpponly kbcompiler KB115521