T
Tao Lu
class A
{
pub:
A(const char*); //1
A(char *); //2
} ;
if i do A a("blah");
which constructor should be called?
because "blah" is a char * const ...so I am not sure about the
conversion that would happen.
I have tested on both gcc and vc and gcc used cotr 1 while vc used 2.
What does the Spec say about this situation?
Thanks.
{
pub:
A(const char*); //1
A(char *); //2
} ;
if i do A a("blah");
which constructor should be called?
because "blah" is a char * const ...so I am not sure about the
conversion that would happen.
I have tested on both gcc and vc and gcc used cotr 1 while vc used 2.
What does the Spec say about this situation?
Thanks.