I think I got it. -code posted below-
If you know of a way to better write this piece of code, please share it with me. Thank you.
--------------------------------------
Code:
#include <iostream>
#include <string>
using namespace std;
string reply;
string answer; // kangaroo rnaooagk
string word;
string word2;
string question(string word, string answer);
int main()
{
string word2 = question("rnaooagk", "kangaroo");
cin.get();
}
string question(string word, string answer)
{
do
{
cout <<"Unscramble the word: "<< word << "\n";
cin >> reply;
} while (reply != answer);
return reply;
}