www.digitalmars.com         C & C++   DMDScript  

D - 0.69 '\\' is an int!

reply "Mike Wynn" <mike.wynn l8night.co.uk> writes:
Walter,

I though I could `~` char[] with char ?
as in
----------------------- test_011.d -----------
import c.stdio;

char[] root = "http://";

int main( char[][] args ) {
 char[] path = "mine";
 char[] msg;

 msg = root ~ '\\' ~ path;

 printf( "%.*s", msg );
 return 0;
}

//
// test_011.d(9): incompatible types for ((root) ~ (cast(int)(92))):
'char[]' and 'int'
//
Aug 13 2003
parent "Walter" <walter digitalmars.com> writes:
Not yet, though I intend to fix it. in the meantime, use "\\". -Walter

"Mike Wynn" <mike.wynn l8night.co.uk> wrote in message
news:bhdecq$ej7$1 digitaldaemon.com...
 Walter,

 I though I could `~` char[] with char ?
 as in
 ----------------------- test_011.d -----------
 import c.stdio;

 char[] root = "http://";

 int main( char[][] args ) {
  char[] path = "mine";
  char[] msg;

  msg = root ~ '\\' ~ path;

  printf( "%.*s", msg );
  return 0;
 }

 //
 // test_011.d(9): incompatible types for ((root) ~ (cast(int)(92))):
 'char[]' and 'int'
 //
Aug 13 2003