DMD 2.0 void[]

nobody not at possible.net
Mon Jun 18 23:52:17 PDT 2007


Hello,

import std.file;
import std.stdio;

int main() {
        string str1 = "Zeile 1\n", str2 = "Zeile 2 \n";
        void[] buf;

        buf ~= str1; buf ~= str2;
        write("test_neu.txt",buf);

        return 0;
}

How must i change the line 
void[] buf  ?

I can make  buf ~= str1.dup  , but i didn't understand why 
dup in dmd 2.0 is needed. 

Thanks


More information about the Digitalmars-d-learn mailing list