Conflict between std.file write() and std.stdio write()
Andrej Mitrovic
andrej.mitrovich at gmail.com
Wed Oct 2 19:57:36 PDT 2013
On 10/3/13, Craig Dillabaugh <cdillaba at cg.scs.carleton.ca> wrote:
> void main( string[] args ) {
> string str = "Hello";
> write( "file.txt", str );
>
> string hello_file = readText("file.txt");
>
> writeln( hello_file );
> }
You can also disambiguate by preferring one symbol over another with an alias:
alias write = std.file.write;
void main( string[] args ) {
string str = "Hello";
write( "file.txt", str );
}
You can also put the alias inside the function.
More information about the Digitalmars-d-learn
mailing list