I have a messaging system. I receive a message as raw data. Memory is dynamically allocated using templates for each message type, then the raw data is copied (actually assigned) to the new template structure.
This works for fixed sized records.
I have a new message that requires a vector; the size of the variable in the record is unknown until run-time.
The template structure created is not the correct size.
Is it possible to create variable size records with templates?
Update: So I guess the basic question is: Is it legal to have a vector defined inside a struct of a class template?