To be obnoxiously pedantic:
const char* foo = "Hello";
is a better choice. It prevents any writes to foo, which would lead to a memory exception, within the enclosing function. (The System::String constructor however won't write to foo because the argument isn't marked as an out parameter.)
|