You need to take a slice of the buffer: char[] buf = Input[]; readln(buf); // line now in buf
The reason for this is because you need to know where the string ends. If you just passed in Input, how would you know how long the line read was?
Peter Alexander via Digitalmars-d-learn Wed, 29 Oct 2014 14:20:41 -0700
You need to take a slice of the buffer: char[] buf = Input[]; readln(buf); // line now in buf
The reason for this is because you need to know where the string ends. If you just passed in Input, how would you know how long the line read was?