I have a function which looks like:
void myFunc(char* myString, char* const buf, int startPos){
myString = &buf[startPos];
std::cout << myString << std::endl; //This outputs fine
}
. . . .
char* myString = 0;
.
.
myFunc(myString, buf, startPos);
std::cout << myString << std::endl; //This doesnt output anything
Why doesn't printing out the string work after I have made the function call?