I have a function that receive a wchar_t*
parameter named somestring
.
I'd like to resize wchar_t* somestring
to contain more elements than it is passed, bBecause I want to copy something larger than the original string:
void a_function(wchar_t *somestring) {
// I'd like the somestring could contain the following string:
somestring = L"0123456789"; // this doesn't work bebause it's another pointer
}
int _tmain(int argc, _TCHAR* argv[])
{
wchar_t *somestring = L"0123";
a_function(somestring);
// now I'd like the somestring could have another string at the same somestring variable, it should have the following characters: "0123456789"
}
Is it possible to resize wchar_t *somestring
to contain more characters?