Im having trouble with the last part of an assignment of storing a user defined string into a one dimensional array. If anyone can help it would be much appreiated. Here's what it requests:
- Prompts the user to enter a string and store it into one-dimensional array.
Replace the content of the string with the string reversed and save into another array.
Print both the original string and reversed one in this function.
Code:
void rev_str() { string message; cin.ignore(); cout << "Enter a string:" << endl; getline(cin, message); cout << message; }
Comment