G
Gary Wessle
Hi
the errors below the code here is my problem. I don't understand
why. can you please help.
thanks
class Test
{
public:
Test(){}
};
class A
{
Test t;
public:
A(Test x):t(x){}
};
int main(){
Test tt();
A a(tt);
}
****************************************************************
cd /home/fred/myProg/toy/
make -k
g++ -gdwarf-2 -c -o main.o main.cpp
main.cpp: In function ‘int main()’:
main.cpp:16: error: no matching function for call to ‘A::A(Test (&)())’
main.cpp:11: note: candidates are: A::A(Test)
main.cpp:8: note: A::A(const A&)
make: *** [main.o] Error 1
make: Target `proj' not remade because of errors.
Compilation exited abnormally with code 2 at Fri Nov 24 16:16:10
the errors below the code here is my problem. I don't understand
why. can you please help.
thanks
class Test
{
public:
Test(){}
};
class A
{
Test t;
public:
A(Test x):t(x){}
};
int main(){
Test tt();
A a(tt);
}
****************************************************************
cd /home/fred/myProg/toy/
make -k
g++ -gdwarf-2 -c -o main.o main.cpp
main.cpp: In function ‘int main()’:
main.cpp:16: error: no matching function for call to ‘A::A(Test (&)())’
main.cpp:11: note: candidates are: A::A(Test)
main.cpp:8: note: A::A(const A&)
make: *** [main.o] Error 1
make: Target `proj' not remade because of errors.
Compilation exited abnormally with code 2 at Fri Nov 24 16:16:10