struct template help
Danyal Zia via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jul 12 12:26:39 PDT 2014
On Saturday, 12 July 2014 at 19:19:28 UTC, seany wrote:
> For reasons further down in the software, I need to do this
> with a pointer. How do I do it with a pointer, please?
I don't know what are you trying to achieve, but if that's what
you want, you can do:
void MYfunction()
{
auto strArr = ["Hello", "World!"];
arc!(string, string[]) * a = new arc!(string, string[])("s",
strArr);
a.some_var = "hello";
}
If you want to use "a" from outside the function you have to
declare it in the class and then initialize it in your function.
More information about the Digitalmars-d-learn
mailing list