C++ method to return a dynamic pointer array -


I have an array in which the hints are given, which dynamically allocates memory to the creator first. I want to make a method to return this array, because it is a private sector. How is this possible?

C ++ method to return a dynamic indicator array is:

  std :: vector & lt; MyType * & gt; Retired; // Return return;  

If you have a private pointer array, you can get a copy of the vector you want:

  std :: vector & Lt; Mytype * & gt; Retired (MyPrivateArray, MyPrivateArray + PrivateArraySize); Return writ;  

Comments