For example I have a( char ** ptr) which includes the address of a string.
I want to put this string in a new string ptr_2 .
It is possible?
For example I have a( char ** ptr) which includes the address of a string.
I want to put this string in a new string ptr_2 .
It is possible?
strcpy(ptr_2, *ptr) should do the trick.
*ptr gets the address of the string you want to copy and from there you can manipulate it with any of the usual string handling functions.
ptr_2 = strdup(*ptr); or simply ptr_2 = *ptr;