Can I do something like this in C++:

Code:
string line;
char sentence[];

cout << "Please enter a string: ";
cin >> line;

sentence = line;