Ask Your Question

Revision history [back]

You need to create a copy of the msg the pointer is pointing do. You can do that by dereferencing it. my_vector.push_back(*msg)

I guess it would make sense for you to look up a bit on C++ programming, especially with regards to pointers. Also related is #q212857.