N
Nan Li
I have questions about the following code. What does the error line try
to declare ? If the next line can succeed, why does the first one fail
? Thanks a lot.
class A {
public:
A( char const * ) {}
};
int main()
{
char const * a = "hello";
A(a); //error
A( (char const *)a ); //ok
return 0;
}
to declare ? If the next line can succeed, why does the first one fail
? Thanks a lot.
class A {
public:
A( char const * ) {}
};
int main()
{
char const * a = "hello";
A(a); //error
A( (char const *)a ); //ok
return 0;
}