need help
Thomas Kuehne
thomas-dloop at kuehne.cn
Mon Apr 24 23:17:36 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jarrett Billingsley schrieb am 2006-04-25:
> "Boris Wang" <nano.kago at hotmail.com> wrote in message
> news:e2k46n$1dkm$1 at digitaldaemon.com...
>> The first printf can't display the information, and the second do.
>
> Uhh, yes it does. For me, anyway.
>
> But I think the real question here is - why are you using printf instead of
> writef? ;)
<snip>
> for ( int i = 1; i < args.length; i++ )
> {
> writef( args[i], ' ' );
> }
That's usually not a good idea(unchecked format strings...), instead use:
for ( int i = 1; i < args.length; i++ )
{
writef("%s ", args[i]);
}
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFETcyD3w+/yD4P9tIRAoLlAJsHZWWhbEADKVfC3blCpG0cY9HStwCeNWZZ
IL9fNNCb5TazTmklf8blE3c=
=nRGq
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-learn
mailing list