Okay, so first thing is that I'm betting your "more_memory" function is not returning char*. Without seeing it's definition though, it's hard to be sure. I'd also recommend looking in to realloc() for what you are doing. --Chris