I have a function like this:
My question is, how should I send mytext char array pointer to stringchange function so it can change sometext array to content of newtext array? And what code should be inside this function to perform thus assignment? Length of mytext array is not defined at the compile-time. I want to change mytext array the same way as sometext array does, of course!Code:void stringchange(char* sometext) { char* newtext = "thisisnewtext"; /*Some code to change content of sometext array to content of newtext array*/ } int main() { char* mytext; cin >> mytext; stringchange(mytext); //??? return 0; }