Dude, u need to use malloc.. Alocate memory, based on the name size, and then store the data there..
But remember, C/C++, will automatically create an array, with all the arguments, if i recall its argv[] .. You could just use that instead, of making your own copy
But malloc is what you need to make dynamic memory management systems..