int main() { char s[132]; cout << "Input a sentence on one line" << endl; cin.getline(s,132); char *m = new char[strlen(s) + 1]; strcpy(m, s); cout << m << endl; ... delete [] m; } Output: (the input sentence)