2013年2月22日 - Your error is because the element isn't dynamically allocated; the vector is. What you're trying to do would require: void func() { vector vec; ...
stackoverflow.com