How to convert this function into a template ?

Vinod K Chandran kcvinu82 at gmail.com
Tue Oct 2 11:40:18 UTC 2018


Hi all,
I have a function and i want to convert this into a template so 
that i can use this function for more than one data type.
This is my function.
```D
void ArrayAdd( ref int[] x, int value) {
     int index = x.length ;
     x.length += 1 ;
     x[index] = value ;
}
```




More information about the Digitalmars-d-learn mailing list