It would probably work but I would not treat non-POD objects like this. Why not 'const char[]' ?