Conflict between std.file write() and std.stdio write()
Craig Dillabaugh
cdillaba at cg.scs.carleton.ca
Wed Oct 2 16:39:38 PDT 2013
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
More information about the Digitalmars-d-learn
mailing list