vendredi 29 juin 2018

Initialize a string vector using 2 strings ("June","July") and Create a dynamic 2D char array that can store 2 strings in c++

Initialize a string vector using 2 strings ("June","July")

Create a dynamic 2D char array that can store 2 strings and copy the above strings from vector to the array.

Prevent any memory leakage using proper allocation and dealloction method.

Ans: I've wrote some code but couldn't arrive the solution when copying the vector data to array, below is the code which i'm trying.

Aucun commentaire:

Enregistrer un commentaire