| August 13, 20030.69 '\\' is an int! | ||||
|---|---|---|---|---|
| 
 | ||||
| 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'
//
 | ||||
| August 13, 2003Re: 0.69 '\\' is an int! | ||||
|---|---|---|---|---|
| 
 | ||||
| Posted in reply to Mike Wynn | 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' > // > > | |||
Copyright © 1999-2021 by the D Language Foundation
  Permalink
Permalink Reply
Reply