Ok, the problem is I have a char* and in a function I set it to a variable. That variable only lasts as long as the function does. The problem is it's a char* so it points to the address of the variable, right? So when the function ends, it's terminated and the pointer is pointing at nothing. So I need a way to copy this to the char*(string). strcpy just causes the program to crash because it doesn't seem to like char*s with no length. How could I do this?