Whenever I try to use this code to get a segment of a string, I get an Access Violation. ptrC is a pointer to a position in a char array, and it is within the declared bounds of the array.
temp = *ptrC;
*ptrC = '\0';
*ptrC = temp;
I'm not sure I understand the question entirely, but be sure to remember that strings dont need to have the '&' sign in front of them to have there address accessed/passed.
Does that help any? (Probably not, huh?)
int * pInt = &myInt;
char * pChar = myChar;
substring copy problems? :)
You're dereferencing a null pointer perhaps.
Post more code though.
Or are you trying to modify a string literal? For example, this is wrong:
char *p = "Testing";
*p = 'B';