simple console input's not working...

predaeus predaeus at
Fri Jun 6 00:32:45 PDT 2008

SodiumFree Wrote:
> inputTest.d(6): function (char[],bool) does not match parameter types ()
> ...
> Any idea what's going on?

# final bool readln (ref char[] content, bool raw = false);
    Retreive a line of text from the console and map it to the given argument. The input is sliced, not copied, so use .dup appropriately. Each line ending is removed unless parameter raw is set to true.

    Returns false when there is no more input.

So, the syntax of readln is a bit different. You have to pass it the string that will hold the data.

More information about the Digitalmars-d-learn mailing list