The reason for the crash is that you haven't allocated any memory for the name. All you've done is declared a pointer - but you haven't initialised it to point to any area of memory that's been reserved for the string. So you're attempting to store the name in a random area of memory.
bugbyte's post shows how to create an array to hold the name, on the stack. I'd also second his recommendation to learn how to use std::string, rather than C-style character arrays.