Transferring vector of objects between C++ DLL and Cpp/CLI console project
问题 I have a C++ library app which talks to a C++ server and I am creating a vector of my custom class objects. But my Cpp/CLI console app(which interacts with native C++ ), throws a memory violation error when I try to return my custom class obj vector. Code Sample - In my native C++ class - std::vector<a> GetStuff(int x) { -- do stuff std::vector<a> vec; A a; vec.push_back(a); --- push more A objs return vec; } In my Cpp/CLI class public void doStuff() { std::vector<a> vec; vec = m_nativeCpp-