Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename T>
- T* memoriaExacta(T* buff, int num) {
- T* arr = new T [num + 1];
- for (int i = 0; i < num; i++)
- arr[i] = buff[i];
- arr[num] = NULL;
- return arr;
- }
- /* Si esta siendo llamado de otro archivo .cpp, no olvidar colocar los tipos particulares que va a recibir, por ejemplo: */
- template void** memoriaExacta(void** buff, int num);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement