D1: std.md5: corrections for the given example

Stewart Gordon smjg_1998 at yahoo.com
Wed Sep 16 11:14:48 PDT 2009


notna wrote:
<snip>
> This isn't working here (DMD v1.042, Windows XP Pro). I had to replace 
> it with:
> while ((len = fread(buffer.ptr, cast(uint)1, buffer.sizeof, file)) != 0)
>                            ^^^  ^^^^^^^^^^
<snip>

The .ptr is necessary, but the cast(uint) isn't.  Even if a change of 
type were necessary, just 1U would do.  (U is a suffix meaning unsigned. 
  There's also L meaning long.)

Stewart.


More information about the Digitalmars-d-learn mailing list