Re: Template class to allocate 2D/3D dynamic memory

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Gangadhar NPK wrote:
> Putting the statement:
> template class CADynamicAllocator<float>;
> at the end of your ADynamicallocator.cpp file should fix the code.


Thanks.. the links helped by all means!
But considering that it is a template class, everytime the data won't
be 'float'. Would the statement:

template class CADynamicAllocator<float>;

...cover other data types too? Or do I have to specify for every
possible type?
In case, every type is to be covered, I would rather stick to the
'keep-everything-in-header-file' approach. Maybe not slick, but it
works.

warm regards,
D. Rathore

.



Relevant Pages

  • Re: Need reviews of HLA Adventure
    ... > The coming of the next great disaster is scheduled for 19-Jan-2038, ... just a recompile to fix the problem. ... data types and recompile. ...
    (alt.lang.asm)
  • Re: auto_ptr compile error
    ... The discussion context is a little mess. ... I want to confirm with you that you think the best fix for the code should be, declare full type of class Thing, before using it in any template class, including auto_ptr and vector, right? ...
    (microsoft.public.vc.language)
  • Re: Template class to allocate 2D/3D dynamic memory
    ... for each datatype you need to specify to the compiler regarding the code that is to be generated. ... template class CADynamicAllocator; at the end of your ADynamicallocator.cpp file should fix the code. ... ..cover other data types too? ...
    (microsoft.public.vc.mfc)
  • Re: Setting chart Xvalue errors
    ... training space will fix the problem, Ive seen some strange fixes... ... three different electrical data types but it works and will save me ... Ill come back when I'm done and work your ...
    (microsoft.public.excel.programming)
  • Re: auto_ptr compile error
    ... You mean if we change the structure of a class, which is used as type parameter of the template class, we have to recompile? ... A quick search of this group shows at least two threads on the pimpl idiom that you have taken part in, so you should know the meaning of "compilation firewall". ... So that is how you can fix it. ...
    (microsoft.public.vc.language)