Hey all,
I was working on a linked list dynamic memory class when I realized something. I don't know how to dynamicly allocate templet objects. Such as this. Say I have a templet class MemoryBlock. Normally I would say
MemoryBlock<int> block;
right? er, or was it
MemoryBlock block<int>;
Anyway, what I want to know is this. If I want to dynamically allocate a templet class, where does the type go? would I do this:
MemoryBlock<int> *var = new MemoryBlock;
or
MemoryBlock *var = new MemoryBlock<int>;
or
MemoryBlock<int> *var = new MemoryBlock<int>;
????
Any help is greatly appreciated. Thanks ahead of time.
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I'm using Windows!"
Edited by - ATronic on December 18, 2001 12:45:50 PM
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"