Map and arrays

Tom tom at nospam.com
Sat Nov 27 22:48:28 PST 2010


Hi,

I wonder how to solve this kind of stuff...

void foo(string[] sarray) {
     // do something with sarray
}

void bar(int[] iarray) {
     auto sarray = map!(to!string)(iarray);
     foo(sarray);
}

And get...

foo (string[] sarray) is not callable using argument types (Map!(to,int[]))

What should I do? Is there some way to get the original array type?

Thanks in advance,
Tom;


More information about the Digitalmars-d-learn mailing list