#include const int MAXCHARS = 81; void getaline(char []); // function prototype int main() { char message[MAXCHARS]; // enough storage for a complete line cout << "Enter a sentence:\n"; getaline(message); cout << "The sentence just entered is:\n" << message << endl; return 0; } void getaline(char strng[]) { int i = 0; char c; while(i < MAXCHARS && (cin.get()) != '\n') { strng[i] = c; // store the character entered i++; } strng[i] = '\0'; // terminate the string return; }