Yeah, that'll work. For input from stdin(cin), I prefer to use string objects because I find them a little easier to work with than char arrays.
Code:
#include <iostream>
#include <string>
using namespace std;
int main() {
//The string can be created just like an int, char, etc.
string firstname, fullname;
cout <<"What's your first name?" <<endl;
//You can use the cin >>operator to input to the string
//However, the string will be delimited by whitespace
//e.g. If you entered "John Smith", the string "John" would be stored
cin >>firstname;
//The string can be printed with the cout << operator
cout <<"What's your full name, " <<firstname <<"?" <<endl;
//To input a whole line into the string, use getline() (not cin.getline())
getline(cin, fullname);
//The first argument is the stream that you want to input from(cin), and the second
//is the string to input to
cout <<"Well, " <<fullname <<", it's been fun but I gotta go." <<endl;
}
For more info on string objects, refer to your book(if it's any good), or search for "c++ string objects" with google.