/*********************************************************
* file name: average.cpp
* programmer name: your name here
* date created: 9/02/10
* date of last revision: 9/02/10
* details of the revision: none
* short description: Calculating the average of 3 numbers
**********************************************************/
#include <string>
#include <iostream>
usingnamespace std;
void instructions();
int main()
{
// Program description
instructions();
// Declare the variables for the string and the separated words
}
void instructions()
{
string fourWords, splitString, wordOne, wordTwo, wordThree, wordFour, reversedWords;
int asterPos;
// Ask for the words separated by asterisks
cout << "Enter for words seperated by an asterisks " << endl;
cin >> wordOne, wordTwo, wordThree, wordFour;
splitString = fourWords;
// Separate the words
asterPos = splitString.find("*");
wordOne.assign(splitString, 0, asterPos);
splitString.erase(0, asterPos + 1);
…..
// Concatenate the words in reversed order
fourWords = wordOne + wordTwo + wordThree + wordFour;
// Show the words in the original order and the new order.
cout << fourWords << endl;
return(0);
*Write a program that reads a string containing exactly four words (seperated by * synbols) into a single string object. NExt extract each word from the orginial string and store each word in a string object. Then concatenate the words in reverse order to form another string. Display both the orginal and final string strings *
These are my instructions but I don't understand them fully. Can someone explain seperating the words part and can you tell me if what I have is somewhat right