I am a java programmer and one day old to C/C++ programming. And I am attempting to create a std::string from char*
This is my character buffer -
char* token = (char*) malloc ((numberOfCharacters) * sizeof (char));
And this is how I create a std::string object -
std::string strKey (token);
But do I need to free 'token' after this call or the strKey
refers to character buffer pointed by token?