I want to store a buffer data. I will have to append data to data in the form of BYTEs, WORDs, and DWORDs. What is the best way to implement data? Is there something in the STL for this?
I want to store a buffer data . I will have to append data
Share
From the little you’ve said, it sounds like you want to have different types in an STL container. There are two ways to do this:
std::vector< boost::shared_ptr<MyBaseObject> >std::vector< boost::variant<BYTE, WORD, DWORD> >)If, however, you need to interface with some legacy
Ccode, or send raw data over the network, this might not be the best solution.