Are you trying create an array of pointers to ne? In that case you can use a pointer to a pointer: struct ne **ret;
To allocate the array of size n you can do. ret = malloc(sizeof(struct ne*) * n);
To allocate each element i=0,...,n-1 you can do ret[i] = malloc(sizeof(struct ne));
If you instead want an array of ret you can do struct ne *ret;.
To allocate the array of size n you can do. ret = malloc(sizeof(struct ne) * n);
If you have struct ne *ret then ret can be used to to point to the first element in an array. The size of that array doesn't matter because ret is only pointing to one of the elements in the array.