How do I typedef a template?
I use std::vector quite a lot but I use it in ways that it shouldn''t support (like memcopying between beginning and end).
One day if this gives me problems I''ll write my own array class however I don''t want to have to rewrite large portions of my code so I''d like to typedef std::vector to CArray. That way if I ever need to drop vectors I can just replace the typedef with an implementation.
typedef std::vector CArray doesn''t work however... Is this a syntax thing?
thanks
chris
i think if you make CArray inherit from Vector,you can use CArray or CArray as your wish, and you can change to another container implemetation by modify the CArray''s definition, it wouldn''t take lots of time.
------------------------------
Dedicate to nobody, I''m nobody
------------------------------
Dedicate to nobody, I''m nobody
oh god rides the flaw, the board changed my post:
------------------------------
Dedicate to nobody, I''m nobody
CArray<int> or CArray<YourClass>
------------------------------
Dedicate to nobody, I''m nobody
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement