Removing elements from dynamic array

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 9 07:28:55 PDT 2015


On 10/08/2015 2:24 a.m., Reflexive wrote:
> On Sunday, 9 August 2015 at 13:40:51 UTC, cym13 wrote:
>> On Sunday, 9 August 2015 at 13:22:02 UTC, Reflexive wrote:
>>
>> You can use std.algorithm.remove for that. If you need more advanced
>> ways to remove elements, you may want to switch from a regular dynamic
>> array to a std.container.array.
>
> I get :
>
> Error: module remove is in file 'std/algorithm/remove.d' which cannot be
> read
> import path[0] = /usr/include/dmd/phobos
> import path[1] = /usr/include/dmd/druntime/import
>
> I'm in Linux Mint 17 ... maybe an permission problem ?

You sure you are using it correctly (off top of my head)?

-----
import std.algorithm : remove;

...
arr.remove(e);

-----


More information about the Digitalmars-d-learn mailing list