Syntax Sugar for Initializing a Fixed float Array as void*?

jwatson-CO-edu real.name at colorado.edu
Thu Dec 1 00:39:21 UTC 2022


Is there a way to write a single statement that creates a void 
pointer that points to an initialized float array?  See below:
```d
float* arr = cast(float*) new float[4];
arr[0] = 0.1;
arr[1] = 0.1;
arr[2] = 0.1;
arr[3] = 0.1;
void* value = cast(void*) arr;
```


More information about the Digitalmars-d-learn mailing list