reading file byLine

cym13 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 6 14:23:49 PDT 2015


On Sunday, 6 September 2015 at 21:18:28 UTC, Namal wrote:
>> That should be it though... Could you try this minimal 
>> complete test?
>>
>> import std.stdio;
>> import std.algorithm;
>>
>> void main(string[] args) {
>>     int[] arr = [1, 2, 4, 2, 3, 4, 1];
>>     arr.sort.uniq.writeln;
>> }
>>
>> // [1, 2, 3, 4]
>
> yes, it works likte that.
>
> unique(arr) I get
>
> Error: undefined identifier 'unique', did you mean template 
> 'uniq(alias pred = "a == b", Range)(Range r) if 
> (isInputRange!Range && is(typeof(binaryFun!pred(r.front, 
> r.front)) == bool))'?

Well, if you don't type function names right, it will be hard to 
help you.


More information about the Digitalmars-d-learn mailing list