Creating a pointer array
data pulverizer
data.pulverizer at gmail.com
Wed Aug 19 13:15:47 UTC 2020
On Wednesday, 19 August 2020 at 13:12:21 UTC, data pulverizer
wrote:
> On Wednesday, 19 August 2020 at 13:08:37 UTC, Adam D. Ruppe
> wrote:
>> On Wednesday, 19 August 2020 at 13:03:54 UTC, data pulverizer
>> wrote:
>>> How do you create an array of pointers in D? I tried
>>> something like
>>>
>>> ```
>>> double* []y;
>>> ```
>>
>> I'd write it
>>
>> double*[] y;
>>
>> but yeah that's it.
>>
>>> Error: only one index allowed to index double[]
>>
>> That must be at the usage point where you prolly just need
>> parens or something.
>
> Argh, Sorry! The error was from the line before! False alarm. I
> was wandering why something so obvious wasn't working. Thanks
> anyway.
For the record using:
```
(double*)[] data;
```
gives an error
```
Error: found * when expecting . following double
Error: found ) when expecting identifier following double.
Error: found data when expecting )
```
the other version was fine.
More information about the Digitalmars-d-learn
mailing list