If you know when you're writing the program what the string is, you can do something like
char *myName = "Bob Newhart";
Otherwise, grab a C++ book and read the chapter on IOStreams. You can probably find lots of stuff by searching the web, too.
Take this with a grain of salt, by the way...