On Wed, 13 May 2009 16:42:51 -0400, "Steven Schveighoffer"
wrote:
>it is a documentation bug, this behavior is not allowed. Please submit a
>bug to bugzilla: http://d.puremagic.com/issues/
>
>On the other hand, string *literals* are implicitly castable to char *:
>
>char *p = "abc";
>
>works.
On Wed, May 13, 2009 at 2:28 PM, Doctor J wrote:
> Taken straight from http://www.digitalmars.com/d/1.0/arrays.html, this
> doesn't compile:
>
> void main()
> {
> string str = "abc";
> char* p = str; // pointer to 1st element
> }
>
> "Error: cannot implicitly conve
On Wed, 13 May 2009 14:28:46 -0400, Doctor J wrote:
Taken straight from http://www.digitalmars.com/d/1.0/arrays.html, this
doesn't compile:
void main()
{
string str = "abc";
char* p = str; // pointer to 1st element
}
"Error: cannot implicitly convert exp
Doctor J schrieb:
Taken straight from http://www.digitalmars.com/d/1.0/arrays.html, this doesn't
compile:
void main()
{
string str = "abc";
char* p = str; // pointer to 1st element
}
"Error: cannot implicitly convert expression (str) of type char[] to char*
Taken straight from http://www.digitalmars.com/d/1.0/arrays.html, this doesn't
compile:
void main()
{
string str = "abc";
char* p = str; // pointer to 1st element
}
"Error: cannot implicitly convert expression (str) of type char[] to char*"
I agree it should