You’re passing the pointer by value, so inside the function you’re actually assigning to a new pointer, not the original one.
Change the function prototype to void StrIn(char *&sp).
1
solved Whats wrong with the Null pointer [closed]
 
You’re passing the pointer by value, so inside the function you’re actually assigning to a new pointer, not the original one.
Change the function prototype to void StrIn(char *&sp).
1
solved Whats wrong with the Null pointer [closed]