L
Luc Claustres
Is it possible to retrieve the number
of elements in a template array
dynamically allocated ?
void allocate()
{
int size = ...
T *pointer = new T[size];
}
void compute(T *pointer)
{
// Here I need the size but I can only access the pointer
}
Thanks.
of elements in a template array
dynamically allocated ?
void allocate()
{
int size = ...
T *pointer = new T[size];
}
void compute(T *pointer)
{
// Here I need the size but I can only access the pointer
}
Thanks.