#include using namespace std; struct WordT { string data; int count{0}; }; void PrintWordT(WordT aWord); WordT MakeWordT() ; void IncrementCount(WordT & fred); int main() { //string word; //int times; WordT myWord; //times = 7; //word = "hello"; myWord.count = 14; myWord.data = "got it"; PrintWordT(myWord); cout << endl; cout << "My word contains " << myWord.data << " and " << myWord.count << endl; cout << endl; myWord = MakeWordT(); PrintWordT(myWord); cout << endl; IncrementCount(myWord); PrintWordT(myWord); return 0; } void IncrementCount(WordT & fred){ fred.count++; } WordT MakeWordT() { WordT returnValue; returnValue.count = rand() % 100; returnValue.data = "some value"; return returnValue; } void PrintWordT(WordT aWord){ cout << "The string is " << aWord.data << endl; cout << "The count is " << aWord.count << endl; }