Conflict between std.file write() and std.stdio write()

Craig Dillabaugh cdillaba at cg.scs.carleton.ca
Wed Oct 2 16:40:54 PDT 2013


On Wednesday, 2 October 2013 at 23:39:39 UTC, Craig Dillabaugh
wrote:
> Hello,
> I have the following program:
>
> import std.file;
> import std.stdio;
>
> void main( string[] args ) {
>    string str = "Hello";
>    write( "file.txt", str );
>
>    string hello_file = readText("file.txt");
>
>    writeln( hello_file );
> }
>
> When I try to compile this I get:
>
> test.d(6): Error: std.stdio.write!(string, string).write at
> /usr/include/dmd/phobos/std/stdio.d(1656) conflicts with
> std.file.write at /usr/include/dmd/phobos/std/file.d(318)
>
> I think this should work.  The example at the end of (D file 
> I/0):
>
> http://www.docwiki.net/view.php?pageid=145
>
> Uses write() exactly the way I am using it here.
>
> Cheers,
>
> Craig

D compiler DMD 2.063.2


More information about the Digitalmars-d-learn mailing list